Optimizing WordPress for Shared Hosting

If you run a blog and want it to be read, you need a site that’s up and running as much as possible. WordPress will keep you away from many of the nasty site hosting details, but you can be sure that you will run into performance issues at some point. WordPress will help you with a number of useful plugins and options. This post lists 3 easily implemented strategies that should give you some extra mileage before you upgrade your hosting plan.

Shared web hosting is a mixed blessing. On the one hand, you get an extremely affordable website, on the other hand, most providers try to host an incredible amount of sites on one server so they struggle to make true on their promises of unlimited bandwidth and other resources. If you’ve visited the site during the last weeks, you might have noticed that Streamhead is struggling too.

Very long loading times seemed to indicate database problems, but after some back-and-forth with the web hosting helpdesk, it turns out I’m being throttled due to too heavy load on the server. I don’t hold a grudge against Lunarpages at all, I’m still happy with their support and hosting. It’s just that an increased number of visitors is pushing the shared hosting plan to its limits.

I’ve now taken a number of precautions to hopefully stay a little longer on my current hosting plan until I figure out a way to earn some money for better hosting. Donations and consulting work are always welcomed, btw 😉

Here’s what I did.

Caching

This is the single most important step you absolutely have to take if you are running WordPress. Install either WP Super Cache or W3 Total Cache. It doesn’t matter too much which one you take. Their features are very comparable.

I was already running WP Super Cache, but I’ve tweaked the settings a little. I’m now using “mod_rewrite” based caching (in the advanced options), which means there’s no need at all to invoke any php script for cached pages. I have also increased the cache expiry time so pages stay in the cache for a day (unless they are updated of course)

Plugin Tweaking

Chances are good that you have a big number of plugins installed. If you have performance issues, take a very good look at the list and try to remove as many plugins as possible. Also experiment to figure out if any one plugin is causing excessive load.

The “top posts” plugin is currently disabled to see how the resource usage changes.

Database Optimizing

The WordPress database tends to get cluttered after some time with old post revisions and other unused data. Sadly, it appears WordPress does not, by default, offer tools to solve this.

Luckily, there’s the WP-Optimize plugin which allows you to clear out unnecessary data. With the plugin, I was able to clean up 2/3 of my database. I had collected over 2000 old post revisions over the years.

The plugin also offers an option to optimize the MySQL database. You can do this just as well via phpMyAdmin, but it’s easy to have the option in your WordPress admin interface.

Further Optimization

If that still isn’t enough, the WordPress site offers a number of additional useful tips that will allow you to reduce the load on your site even more. They’re a bit more advanced, but might be worth your while.

If you have more tips, feel free to share them in the comments.