The feature did work in the past however pages now seem to default to 'Default Template'.

I can see my available page templates in the drop-down on the Page edit page, however after saving the admin simply shows 'Default Template' again.

I have tried disabling all plugins as well as remaking some of the templates, however the behaviour continues.

Any ideas?

Note: I'm using latest self-hosted WordPress.

Update: After some digging it would appear that I am getting 'Table xxx/wp_postmeta' is marked as crashed and should be repaired". However running repair through phpmyadmin does not fix the issue.

Update: Rebuilt the table entirely, still have issue.

(Originally posted this question here: https://webapps.stackexchange.com/questions/33627/wordpress-page-edit-does-not-save-selected-template)

  • Switch to the default WordPress theme and try adding a custom page template to that theme and test whether or not setting a template under page attributes saves correctly. If so, then its likely something in your functions.php causing the issue (if you say all plugins are disabled).
    – Adam
    Oct 24, 2012 at 8:31
  • Still having the same issue with a default theme. Oct 24, 2012 at 8:44
  • 1
    Full troubleshooting?
    – brasofilo
    Oct 24, 2012 at 9:41
  • Looked through that now, checked a couple of things I had not before. Issue remains. Oct 24, 2012 at 10:46
  • 1
    Had the same problem. If I edit the page through "Quick Edit", it saves correctly.
    – user51323
    May 7, 2014 at 2:29

5 Answers 5


I had the same issue and it was caused by WPML. I deactivated the option "Synchronize page template" in the WPML translation options and it finally worked.


It sounds like your WordPress installation is coruppted. I'd try removing all of the files (except perhaps the wp-content/ folder and the wp-config.php and .htaccess files), and then uploading a fresh installation of WordPress.

Create a new MySQL database, if you can, and run the WordPress installer. After installation, you can try importing your blog content back using the Tools menu in the WordPress administration dashboard.

It's also a good idea to check for bad code. You've probably already tried reverting to the default theme (Twenty Ten, Twenty Eleven, Twenty Twelve), and disabling all plugins, but you also need to check if there's any files in the wp-content/mu-plugins directory, if it exists.

Good luck solving the problem.

  • 1
    +1 / Thank you for your input, good general troubleshooting tips... Oct 28, 2012 at 17:26

Turns out this was an issue with my hosting.

phpmyadmin although reporting operations as complete was not actually committing repairs / optimisations. Now querying why this is with the company.

So the simple fix was indeed to simply repair + optimise the table.


I had the same problem and solved it.

I solved it by going to the table wp_postmeta (through phpMyAdmin) and just edit the record where:

post_id = {your post id or page id}
meta_key = _wp_page_template

I have changed the _wp_page_template's meta_value to default

Hope it works!

  • 1
    While your solution may work, there is not enough detail here to guide someone through it. Could you edit the answer so that someone with little experience could follow it?
    – s_ha_dum
    Jan 23, 2013 at 18:26

Just a quick note after reading Björn Weinbrenner's answer:

If you're good with all translations having the same template, there's no need to turn off "Synchronize page template".

In this case, the reason the template value is reverting after you save is because you're changing it on a translation of the original page. Just change the template on the same page in the main language and the value will be preserved.

This is the correct procedure, unless you really need a different template on a specific language.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.