As you may or may not have noticed my site has experienced quite a bit of down time lately. This is due to the fact that WordPress is a bit of a CPU hog. This seems to be a very common problem if you’re on a shared hosting server. There are a few things you can do to bring the usage down before you have to switch over to a dedicated server so give these a shot.

How To Reduce CPU Use age

CPU use age goes up every time WordPress makes a call to the database. So you will need to take a look at the plugins you have installed. I know it hurts, but you really need to evaluate what plugins need to stay and which need to go. I got this handy bit of code from cravingtech.com which helped me see how many database calls I was making. You can copy and paste this strip of code to your footer, header, sidebar, or wherever and it will give you the number of database queries your site is making.

I went through and one by one turned off my plugins to see which ones had the biggest draws. These were the first to go. I kept all the SEO plugins I had installed as those are important and not much of a draw anyways. I know there are a ton of great plugins out there, but when you get down to brass tacks if they’re not getting you traffic then what are they good for?

Remove Recent Comments

I know, I know this is a big one to as it helps promote blog posts. Any serious SEO guy will tell you this, but in the interest of not frying out your shared hosts CPU it’s necessary. This was a big one for me, but it significantly brought down the number of database calls my site was making.

Update google xml sitemap options

This to was a big issue as a sitemap is defiantly something you need, but there are ways to optimize the default settings which will help tremendously. This does mean that you have to generate a new sitemap every once and a while, but it’s worth it load-wise.

From WP-Buster

1. BASIC OPTIONS CONFIGURATION

Under Basic options, you can untick the option of ” Rebuild sitemap if you change the content of the blog “. This small change in setting will help you reduce server load as the sitemap wont be generated every time you write a new post. You can generate sitemap manually if you have issues with your server.

2. ADVANCE OPTIONS SETTINGS

You can limit the number of posts to be included in sitemap to 5 or 10. It will help you reduce server load with no problems with your sitemap as it will be uptodate.

3. BUILD SITEMAP IN BACKGROUND.

Make sure that the option of ” build sitemap in background” is ticked ON. Its a must if you are on a shared server.

A few Plugins To Consider

First and foremost you should install WP Super Cache. This should be a core part of WordPress, but until it is this one is a MUST! WP Super Cache is a static caching plugin for WordPress. It generates html files that are served directly by Apache without processing comparatively heavy PHP scripts. By using this plugin you will speed up your WordPress blog significantly.

Bad Behavior – Deny automated spambots access to your PHP-based Web site.

Disable revisions – Every time WordPress saves a revision is another call made. By installing this feature this will eliminate that issue. As I normally do my writing in dreamweaver before I post this wasn’t an issue for me.

I Know It Hurts

I know some of these suggestions can be a little painful, but until you’re ready to move to a dedicated server these should help to knock down your CPU use age and keep your site live. These are the steps I followed and I reduced the number of database calls by over half.