WordPress plugins, themes, tips and hacks

Make sure WordPress doesn’t switch to the default theme

February 11, 2008 – 11:35 am | by Miriam Schwab

Have you ever been working on your WordPress blog’s design, when you refresh the page only to find that it’s decided to revert to the default theme?

This has happened to me pretty often, and apparently I’m not the only one. Mark O’Neill says that his WordPress blog would revert to the default theme overnight while he was sleeping!

He did a search, and found this post on the topic, that explains that this glitch introduced itself in WordPress 2.2. A WordPress moderator on a forum topic related to this issue explained the problem as follows:

The root cause is that Wordpress reverts to default in certain cases where it cannot find the theme. A lot of conditions are known to cause this to happen falsely. For example, if the filesystem is slightly flaky, then there are instances where it may return an error incorrectly, causing Wordpress to reset to default. Another case is where somebody accesses the site at the exact moment you’re uploading a modified version of the theme.

The moderator goes on to say that it’s not a WordPress problem, so they’re not going to try to fix it:

Currently, there is no fix for this problem from the Wordpress side of things, because it’s not necessarily an issue with the Wordpress code. Wordpress is doing what it was designed to do. What’s happening is that Wordpress is getting false error codes and responding to them in unexpected ways.

One of the members on the forum pointed out that the problem only began when they upgraded to WordPress 2.2, and another member, justkristin, said that this avoidance of responsibility was unacceptable:

I have to say that, while I will continue to use WordPress because it is superior to everything else out there, I cannot help but be confused by the assertion that it is not WordPress’ problem. If I drove a car which, whenever I was in an accident, forcibly changed the clothes I was wearing, I would find that to be a problem with the car no matter who caused the accident. How can the resetting to default of a theme be a proper reaction to any server error?

The solution, as discovered by another member, tmuka:

  1. Rename your theme’s folder to default.
  2. Optional: delete all other themes from the server.
[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]
  1. 4 Responses to “Make sure WordPress doesn’t switch to the default theme”

  2. By Tan The Man on Feb 12, 2008 | Reply

    Had the same problem. Heard it might be a plugin problem, and once I deactivated the Wordpress Mobile Plugin my theme never reverted back.

  3. By Miriam Schwab on Feb 12, 2008 | Reply

    Tan the Man - that’s interesting, since at one point my blog kept doing that, and then it stopped. Maybe it’s because I stopped using a plugin that was causing it do that.

  4. By Darren Hoyt on Feb 14, 2008 | Reply

    At some point this was discussed in the WP Trac, though I can’t seem to locate the message. They were speculating that it mainly happened on sites whose large amount of traffic caused RAM-related flakiness on the host server, bumping the theme back to default. But since then, I’ve seen it happen on low-traffic sites too.

  5. By Miriam Schwab on Feb 14, 2008 | Reply

    Darren - it was happening to me on one of my sites at one point, and it was a very low traffic site. Lately I haven’t had that problem, but I figure the above is a good precautionary measure.

Post a Comment

Revolution Premium Themes