Holy Jumping WordPress Themes Batman!


----------------

By Mark O’Neill

After reading Kiltak’s recent post on backing up and restoring a WordPress blog, I thought I would chip in with a WordPress issue of my very own.

For the past few days, my WordPress blog, which is hosted by Yahoo Webhosting, has been “playing silly buggers” (as we Brits like to say). I would get up each morning to check my blog RSS count and upon getting to the page, discover that WordPress has reverted back to the default template.

This was more than a little irritating because plugins that I had installed on my preferred theme would malfunction on the default theme. How many RSS subscribers have I lost because the template was going all Kamikaze on me? I dread to think. Plus if you’re trying to exude an air of professionalism, having your site template jump back and forth isn’t going to help.

At first I thought it was Yahoo at fault. After all, this is the web hosting company that refuses to let webmasters upload .htaccess files to Yahoo servers. This is the company that tries to strong-arm its web-hosting customers into using an outdated automated set-up process for WordPress blogs, a process that messes up the whole domain from a SEO point of view. So it’s no surprise that when the WordPress set-up started playing Musical Templates that I instinctively suspected the big Y.

Then I considered other possibilities. Was a hacker messing me around by first cracking my WordPress password and then switching the templates around? I suddenly got all paranoid and changed all my passwords.

But finally, as usual, I turned to my trusted reliable friend, Mr Google and typed in “wordpress theme reverting to default“. I immediately found this and realised what was going on. Basically :

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 solution seems to be to delete all WordPress themes except the one you’re using and then, using a FTP program, access your preferred theme on your domain and change the folder name to “default”. So when it tries to go back to the default settings, it will just load up your preferred theme again.

This initially caused my blog to go offline for a few minutes but then it was back. So far everything appears to be fine (fingers crossed).

Has anyone else experienced this? How did you deal with it?







9 Responses to Holy Jumping WordPress Themes Batman!

  1. I had this happen while doing some major theme editing recently. After nearly having a stroke upon seeing the default theme displayed, I looked closer and determined that the cause was accessing while writing, just like you say above. The solution: I’m more patient with refreshing the page when viewing uploaded changes. :)

  2. I had this happen while doing some major theme editing recently. After nearly having a stroke upon seeing the default theme displayed, I looked closer and determined that the cause was accessing while writing, just like you say above. The solution: I'm more patient with refreshing the page when viewing uploaded changes. :)

  3. Pingback: Make sure WordPress doesn’t switch to the default theme | WordPressGarage.com

  4. I tried renaming to my good theme default and then I would just get blank pages. I looked at all of my access and error logs and would get: file not found “mysite.com/httpdocs/wp-includes.php; referrer: mysite.com/httpdocs/site/.

    So somehow my site is telling itself to look for the wrong path – I have everything in a subfolder and all my settings are correct because it works just fine most of the time but then one day, default theme. So I change it back and its fine, and then a few days later = default theme.

    So I’m trying something different: in my themes.php code I commented out
    /*
    */,

    I based this on some research and a help ticket I found on the wp dev site (I think). I don’t recommend anyone else do this until I’ve tested it and see for sure it works.

  5. I tried renaming to my good theme default and then I would just get blank pages. I looked at all of my access and error logs and would get: file not found "mysite.com/httpdocs/wp-includes.php; referrer: mysite.com/httpdocs/site/.

    So somehow my site is telling itself to look for the wrong path – I have everything in a subfolder and all my settings are correct because it works just fine most of the time but then one day, default theme. So I change it back and its fine, and then a few days later = default theme.

    So I'm trying something different: in my themes.php code I commented out

    <code>/*

    */,</code>

    I based this on some research and a help ticket I found on the wp dev site (I think). I don't recommend anyone else do this until I've tested it and see for sure it works.