WordPress Keeps Switching Back to the Default Theme? Here’s a Fix.

I recently started updating my blog again, including a spiffy new theme.  Within a day, my blog had reverted back.  I double-checked my settings and switched the theme to the new one again, and the same thing happened.

If this is happening to you, it might be a file permissions issue on your server.  WordPress tries to be maybe a little too helpful in this case – it has a function called validate_current_theme() that tries to make sure required files for the theme exist and if not, reverts to the default theme that function uses the PHP function file_exists().

You may be able to fix the issue by using an FTP client or SSHing to your server and changing the file permissions of the theme’s style.css and index.php.

If that’s not helping, you can always change the name of the template dir to “default” – WordPress doesn’t do the switch if it thinks you are already using the default theme.