WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] Changing Page template default to 404.php in database

[Resolved] Changing Page template default to 404.php in database

  • This only happens for one page on my site – I’ll update the page, making sure the template value is correctly set, but when i visit the page, it gives me the 404.php error message.

    I’ve checked in the database, and everytime I save my page, the meta value for the page’s meta key _wp_page_template is set to ‘404.php’ as opposed to the proper template file as is for all the other pages.

    Odd thing is that this only happens for this one page. I’ve checked the source code in my template file – i can’t see a PHP error in my code be the problem here since the dashboard is simply resetting a value in the database – i can’t see there be any parsing done.

    I’ve also checked that all other template files do not share the same template name that is used by wordpress, in case this would cause a conflict.

    I’m out of ideas as to what check next, it’s clearly not wordpress that’s causing the error since this is only happening on this one page, but I can’t see any difference between this custom template file and the next custom template file. Any ideas of where to look next?

  • The topic ‘[Resolved] Changing Page template default to 404.php in database’ is closed to new replies.
Skip to toolbar