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:
- Rename your theme’s folder to default.
- Optional: delete all other themes from the server.