A sample text widget

Etiam pulvinar consectetur dolor sed malesuada. Ut convallis euismod dolor nec pretium. Nunc ut tristique massa.

Nam sodales mi vitae dolor ullamcorper et vulputate enim accumsan. Morbi orci magna, tincidunt vitae molestie nec, molestie at mi. Nulla nulla lorem, suscipit in posuere in, interdum non magna.

48 hours after our blog coronary bypass

Previously, I mentioned that we’ve been getting complaints from the server we use that we’re taking up too much CPU. (It’s OK if you don’t know what CPU is. I don’t either.)

Something about our blog was using up way too much. Hubs unplugged every plugin. He changed themes. He danced a little dance around the computer. (OK. Hubs obviously didn’t dance.)

Finally, after 7 days of trying every single thing he knew how to do, he offered one last hope: to take down the blog and re-install everything in a new, clean folder on the server. (OK! You can do it Hubs!)

During the re-installation conundrum, he said words that I have never heard before in all our seven years of marriage, “If that doesn’t change the CPU, I’m calling in for a $30 WordPress consult.”

“Do it. Just call the WordPress guru.” Hubs was obviously a muck – desperately in need of fresh air and baked pies.

And that’s when it happened.

Our itty bitty family blog CRASHED THE SERVER that we rent. I’m saying rent because several other clients also share this server so in Hubs’ attempt to start a fresh, new, clean folder, we took down other websites too. Whoever you are – so sorry!

And then the phone calls began.

Now, for the most part, I was honoring my husband by staying out of the office. I wanted to give him his space. But in a moment when Schäfer was busy I slipped into the office to see if I could be of assistance. (Note: this is where I walk in, sit down and say nothing.)

For the first time in my life, I wished I knew how to record a phone call so that we could share via podcast.

Now imagine, the most bored, monotone genius you’ve ever met. Obviously, our little family blog was not the highlight of his technical day.

Bored Genius went on to say that…

“If you just had a ‘basically vanilla’ theme, you should not have this high of CPU. wow. I think your CPU usage is too high because you actually have real people coming to your website. Let me see. No, you’re not getting spammed. No, you’re not linking to everything in Google. It seems that your blog has constant traffic by real people. You should put some advertising on it. wow. I wish my blog had people coming to it. You’ll need to upgrade and host on your own server.”

Errr…that’s like $500 a year! (Note: we still don’t believe that the CPU problem is caused by traffic because we honestly don’t get that much traffic. Like 100 people read our blog daily…and I’m pretty sure 98 of those people are the Nanamaw refreshing our home page!)

So, after three tumultuous days, we’re visually back. I say visually because Hubs had everything backed up so nothing was really lost. Good ol’ Hubs.

Well, we’re almost back. Somehow, our “categories” are LOST. Sigh.

And so here we are. With another new theme. The jury is still out regarding our CPU. For now, the company we rent server space from has agreed to let us keep renting a shared server.

All of this makes me want to print my blog out on Blurb…just in case we have to go in for a 2nd coronary bypass.

Now the technical aspects from Hubs for other WordPress users who might have the same problems:

So, a week ago our WordPress installation started using way too much cpu on our shared server. I already had wp-supercache installed, yet that wasn’t helping. I uninstalled many plugins, no dice.

Finally, I switch to a different theme, Atahualpa, which seems to help a bit.

The next day, I notice that we were getting blank pages in the administration section of our website. Sometimes I could get to the plugins page, sometimes not. Sometimes showing up with an F5 refresh. Sometimes not. Thinking it was a bad plugin, I uninstalled them one by one, until I could bring up the plugin page. That would work for a couple minutes, then it went blank again. What in the world?

That’s when I decided on a fresh install.

After a long (nearly two hour talk) with the system admin, it turned out that our wordpress options table in our sql database was messed up. We were crashing the server because the old wordpress installation was literally making thousands of queries to the options table at once.

The options part of the database stores data for all the plugins that you have ever installed and your theme amongst other things. When you uninstall a plugin, it DOESN’T remove the entries from the options database. Over several years, this adds up. And for some reason our old wordpress installation was still calling the old plugin information, even though we didn’t have the plugins installed.

A completely fresh install to a new database (the system admin didn’t transfer our categories, though. sigh.) the problem was solved.

So, here’s what I learned:

1. Make sure your have WP-Supercache or Hypercache installed.

2. Install the Clean Options plugin and get rid of all the unused plugin references. There will probably be hundreds or even thousands of old plugin references (of you often install or try new plugins). Be careful. Don’t delete anything that you aren’t sure about.

3. If you use a theme, make sure to put these code in the footer :

<?php if (is_user_logged_in()) { ?>
<?php echo get_num_queries(); ?> queries in <?php timer_stop(1); ?> seconds.
<?php } ?>

Or if you use the Atahualpa theme, just turn it on in the footer section. This will display how many queries your theme is making and how long it takes to display your page. If it’s high (more than 50 queries…remember this is per page load. Multiply this times how many people visit your site a day.), try getting rid of widgets/plugins that you don’t really need or trying a different theme.

4. Finally, if you use the Atahualpa theme you must go through and click the “Save Changes” on each tab under the theme options. This saves all the changes to the database, which will dramatically cut down your sql queries (our went from 270+ to around 35). (In my opinion, they really ought to make a button that saves all the tabs at once.)

4 comments to 48 hours after our blog coronary bypass

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>