Support » Fixing WordPress » Page template not saving

  • Hi everyone,

    I’ve also posted this to WPMU, but thought someone here might of seen this before. I am seeing what looks like a bug. One of the blogs in my MU install uses several Page Templates. When I switch a page template from ‘Default Template’ to ‘Homepage’ for instance, then ‘Update’. The page template field says ‘Homepage’ but the template is not actually applied, the ‘Default Template’ is still in use. If I go into phpMyAdmin, and go into wp_1_postmeta and locate the row specific to this post’s id, the meta_key for ‘_wp_page_template’ still has a value of ‘index.php’ instead of ‘Homepage.php’. If I manually change this value all’s well. Any idea why this happening? Thanks!!!


Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi James

    I have the same problem.. Your post helped me to fix my problem , so thanks a lot..

    i figured it out that my wp_postmeta table was corrupted though it was not saving page templates..

    Check wp_postmeta table.. this may be helpful for you..

    Thanks & Regards

    Hey Logicfire.. glad this helped you!

    I’m seeing a new problem now that when I edit the text for said page it is changing my Page Template randomly.. I just edited some text and updated.. The ‘Page Template’ in the editor says “Homepage” but if I go into phpMyAdmin the row for this id in wp_1_postmeta, the ‘_wp_page_template’ key has a value of search.php. This file isn’t even a Page Template?! So this page is now being outputted through search.php… how weird!

    Any ideas? Thanks!


    If I make a text change to any page in my site the Page Template automatically changes to either index.php or search.php… Any ideas?

    Hi James

    yeah! really weird..never heard this kinda problem before..

    but i think your database is okey..

    1.) check your theme on other site or on local server..
    n see if it behaves the same or not..


    2.) The problem might be in wp files i think…
    So you can do one thing just delete old files and upload fresh new files.
    just keep the wp-content folder and wp-config file..

    Try it. may be helpful for you..


    Thank you, James, for sharing your details. After experiencing the same problem, I installed the WP-phpMyAdmin plugin, navigated to the postMeta table and found it corrupted. I then simply selected that table, clicked the Repair option and it successfully restored the table. I’m back in business now, thanks to the details you provided. Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Page template not saving’ is closed to new replies.