The Personal Site of Dan Masters

Nailing Down Slow Performance in WordPress

I originally published this post this way back in may 2006. To date it is the most popular post on my site. Since then though a lot of tools have come out that make diagnosing a slow WordPress install a little easier. Here are sow updated tips that can help you get in the right direction.

Tip #1 – What Plugins are You Running?

My original post outlined how I had disabled all of my plugins and reverted my site back to the default WordPress theme to find out if the site would run fine at it’s basic level. From there I added plugins back one-by-one until I found which one slowed my site down. You can still troubleshoot it that way but there is an easier way.

Jason Jacobs linked to my original article from his article in which he had learned how to use Firebug, a Firefox/IE browser plugin, to find what plugin was slowing his site down. In Firebug their is an inspector that will tell you how long it is taking individual items to load. If there is is a plugin that is not optimized then it is probably going to stand out so you can see if their is an update or an alternative for it.

In my case when I originally wrote the article it was a Lightbox plugin that slowing my site down. I deactivated the plugin and found another one that load quicker. Issue solved.

Here are links to Jason Jacobs article and the Firebug plugin:

Tip #2 – Cache Baby, Cache

The biggest strength and weakness of WordPress in my opinion is the that it is a completely database driven CMS. This is good in that only the parts of the site that you are editing get updated when you hit save unlike MovableType which has to rewrite ever page of the site. The downfall to being database driven is that ever time you load a page or post in your browser then the database needs to be queried in order to render the page.

Enter caching.

What caching does is make a temporary snapshot of each page and post of your site and gives that to your visitors instead of querying the database. This results in your pages and posts being served up much quicker and also reduces the load on your server. When you update a page the caching plugin automatically rewrites its copy so that your visitors get the newer version.

I have started to roll out caching on my WordPress sites and for some of my clients and I have to say that I have been impressed. There is a noticeable difference in how quick pages are loaded. This makes me especially happy since recently Google has stated that they are now going to incorporate page load times into the algorithm they use to determine search engine results. That means you can actually rank lower in search engine results if you site loads slowly.

The other benefit to caching is that if you get a large rush of traffic all of a sudden from a site like digg, Facebook, or Twitter. Without caching most shared hosting cannot query the database quick enough to WordPress show the message “Unable to Establish Database Connection” instead of your page or post. This can be a nightmare if you were trying to make affiliate or Adsense revenue off the page.

I personally use the WP Super Cache and I have been very happy with it. Note: Setup can be a little involved. Be sure to read the instructions carefully so that it is installed properly on your site.

  • W3 Total Cache – Caching, JS and CSS optimization, and CDN (Content Delivery Network) support
  • CloudFlare – This is not a plugin but a caching service for your website. I am currently trying it danmasters.net and am impressed with the results so far. This service will also keep your site up if your hosting goes down.

Tip #3 – Who is Your Host?

You have scrubbed your plugins and they all load around the same amount of time. You have installed the caching plugin and you saw a little improvement. Unfortunately though your site is still loading slow.

What could it be?

Your hosting.

I have been working with WordPress for around 5 years now and I have run it on a lot of different hosting companies. The reason for using different companies was that I had done all on my end for my sites to run good but their servers just could not keep up. From downtime to slowness I have seen a few not so good hosting companies out there.

The reason for the slowness of certain web hosting companies comes down to volume. They just have too may people/web sites on a single server. WordPress especially puts a load on MySQL servers as most people do not use caching. The only way to remedy this is to switch hosting companies.

Personally I have used Hostgator (affiliate link) for the last 3 years and have been very happy with them. I run about 20 websites on their shared hosting and get about 10k visitis a month without an issue. I have also started to use wpengine.com on one site to test their WordPress only hosting. So far it is speedy and they are quick to make updates to WordPress so I don’t have to.

From my experience here is a list of host that have not been so great running WordPress:

  • Godaddy – great for domain names but hosting is not so great – They are also partnered up with CloudFlare
  • Network Solutions – not great for domain names or hosting IMO
  • Jodo Host – This is who I had before Hostgator. They are better now but still not as good as Hostgator

If you have tried the other too solutions above and still are having issue then I would check out a different hosting company.

Note

You may notice that some of the comments below in regard to this article are old – very old. That is because I originally wrote this article in May of 2006. In that time I have got a lot a traffic to it but after 4 years the material was dated. I just refreshed the article in June 2012 so to info should be good for a while. Happy troubleshooting!

Comments

17 responses to “Nailing Down Slow Performance in WordPress”

  1. Mike Avatar
    Mike

    Dan,

    I think it is ShortStat as well. I’ve notice my site running really slow lately. Today I disabled Shortstat and it seems ot be running much quicker. We’ll see if that is it.

    Mike

  2. Dan Avatar

    There is actually something you can do to fix ShortStats. It seems that it has to go to seperate server to get the country info and that can take some time.

    There is a post about it here.

  3. Neil Avatar

    I didn’t have any problems prior to using the Lightbox plug-in. I appreciate your input! As cool as it looks, it’s not that big a deal to display my images in this fashion. I will probably deactivate it on my site.

  4. Gary O Avatar

    Dan,

    Thanks for the heads up on the Lightbox plugin. I have also disabled the plugin and my site loads significantly quicker.

    In my opinion the Lightbox effect is cool initially but then became a pain – have gone back to a traditional gallery.

    Regards

    Gary O

  5. Laurie Avatar

    Dan, thanks for taking the time to work these steps out. In the last few days I installed several gallery plugins (lazy gallery, ANIga and one other that I can’t remember now.) My blog was so slow that I couldn’t take it. I removed plugins, removed google analytics and reverted to the default template. While the blog loaded more quickly, it still takes about 8 seconds to load.

    http://www.lauriemcginley.com/blog/

    I reverted to the design tweaks but left all plugins off, deleted them from the server and removed extra themes from the site.

    Any ideas?

  6. Mark Avatar
    Mark

    I had the exact same problem with the wp-lightbox2 plugin, although mine only started slowing down over the last few days.

    I too, had a crack at my hosting providers, to no avail.

    My problem now is that I really liked the way the lightbox plugin worked before it all slowed down to a drastic halt, and I have a number of clients using the same plugin.

    Anyone got any ideas for a workaround? 🙂

  7. Dan Avatar

    @Mark –

    You might want to see if you have the latest and greatest version of the Lightbox plugin.

    If I recall correctly the latest release had a lighter JavaScript code which should make it faster.

    IMO no matter what you are probably going to see a performance hit no matter what.

  8. […] host, a plugin, or some content that it just to stinking big. I found an article by Idano called Nailing Down Slow Performance in WordPress. The approach outlined entailed reverting to the default theme, disabling all plugins, and then one […]

  9. markvschwartz Avatar

    Amazing. My RSS feeds have been timing out and my WP blogs load slow as can be. I thought it was an RSS feed problem, and then a server problem, because the feed was always timing out.

    I just disabled the ShortStat plug in, and now my RSS feeds do not time out.

    …. not sure why, but it’s working now.

    Mark
    Mark’s – All About Real Estate Blog

  10. Dan Avatar

    Mark,

    I actually dumped shortstats altogether for the WordPress.com stats. It is free and has more info. The other thing that I like is that if you have multiple blogs you can register them all under the same WordPress.com account and can toggle easily between each site’s stats.

    You should check it out – WordPress.com Stats

  11. […] El blog ya estaba demasiado lento al punto de ser insoportable. Me puse a buscar y encontré este listado de tips para resolver problemas de velocidad que finalmente resolvió el problema. Como el listado está en […]

  12. […] a plugin, or some content that it just to stinking big. I found an article by Idano called Nailing Down Slow Performance in WordPress. The approach outlined entailed reverting to the default theme, disabling all plugins, and then one […]

  13. haaraalde Avatar
    haaraalde

    Much appreciated, blog my blog runs smoothly again.

  14. […] host, a plugin, or some content that it just to stinking big. I found an article by Idano called Nailing Down Slow Performance in WordPress. The approach outlined entailed reverting to the default theme, disabling all plugins, and then one […]

  15. Jamie Avatar

    When using wordpress I found my website was incredibly slow, I wish I had read this blog when I first started using it. It took me months to bother finding a solution which was to start caching, that really sped up my website by a huge margin.

    I’d agree with GoDaddy not being great for hosting, I’ve never tried hostgator though – perhaps I should.

    Great post anyway, thanks!