One of the questions that comes up fairly regularly in my weekly WPMU DEV chats is “how can I speed up my WordPress website?” It’s an important question, particularly for businesses who want to scale their website. Of course, the procedures necessary for speeding up your website are going to differ depending on whether you have a site the size of something like WPMU.org or a lamoid little homepage like my own.
You should care if your website is fast – it makes a difference for a number of reasons:
- SEO – Google uses site speed to determine rankings
- Usability – If your users have to spend ages waiting for your website to load then they’re going to be off somewhere else. No one will notice if your page loads quickly but they will notice if it’s slow. Take too long and your visitor will be off elsewhere.
There are lots of different tips and tricks out there. Some of them will speed up your website loads. Others will add just a little bit of speed. If you’ve got a massive site and it is taking a long time to get anywhere then you’ll want to squeeze every bit of optimization out of it. For a small site, just one or two of the steps will be enough to get your website speedy.
Plugins….. we all love them. There’s nothing more cuddly than a brand new plugin that supercharges your website. But we are all guilty of installing ones we don’t really need, or of installing a plugin, trying it out, deciding we don’t really need it and deactivating it,leaving it sitting inactive in our installation (nb – an inactive plugin won’t slow your site down but it will take up space. This will only cause you problems if you have restricted space). As is pointed out on this forum post, each plugin removal will speed up your website, even if it is only by a millisecond.
Here are some tips for plugin use for speedy-sites:
- Only install plugins that you plan to use
- Install plugins on a test site before installing on your main site
- Deactivate and delete plugins that you aren’t using
- Don’t use a plugin when you can use code – there are lots of lovely Twitter plugins, for example, but Twitter provides code for a widget that you can drop straight into your text widget or even place directly in your theme.
Okay, on a clean install of WordPress 3.1 with TwentyTen installed here is a site’s score with Google’s Page Speed Tool:
That’s okay. Not great but not dreadful either.
Here is the same install with 10 of WordPress’ most popular plugins activated:
Featured Plugin – Every great SEO tweak you need, in one snazzy bundle
Find out more
So much slower…… It’s not hard to see the difference that the plugins make.
NB: The plugins that I used for this test are: Akismet, All in One SEO Pack, Contact Form 7,Google Analytics for WordPress, JetPack, NextGEN Gallery, WordPress Importer, WPTouch,Yet Another Related Posts Plugin, Add to Any
A caching plugin will make the biggest difference to your blog or website’s speed. If you are concerned about speed and don’t have one installed it should be the first thing that you do. Every time someone visits your website WordPress gathers up all of the information that it needs from your database. A caching plugin stores a flat HTML version of your website and, provided there has been no changes – a new comment or blog post, for example – serves that up instead.
There are a number of different caching plugins out there and it can be difficult to know which one to choose. The one that you go with will largely depend on what your website needs. Do you have a small website that needs a simple caching plugin for a small number of visitors? Or do you have large amounts of traffic and require lots of options to customize the plugin as you wish?
- WP Super Cache – This is a modification of the WP Cache plugin. It stores data as HTML so a page visit does not require a trip to the database.
Here’s how my test site did after I set up W3 Total Cache:
!!!! That is speedy!! W00t!
And this is interesting – with the same ten plugins installed as above, running W3 Total Cache check out the results:
That’s even faster than a clean WordPress install. I’m impressed! If you’re not caching –start!
Some Cache-Related Resources
- Ben from Binary Moon has a fantastic three-part series about WordPress Caching. It’s definitely worth checking out. He goes into quite a bit of detail about how to use the often ignored built-in WordPress caching capabilities as well building your own caching plugin
- Olly from WPLift has got an indepth walkthrough on setting up the W3 Total Cache Plugin
- Check out WPBeginner’s walkthrough on setting up WP Super Cache
- An interesting comparison of the various caching tools using the Apache Benchmark tool
3. Choose a Good Hosting Provider
This can be a difficult task – especially if you’re not familiar with the ins and outs of web hosting. Many people, when they set up their first website, will go with a popular and cheap shared hosting option like Host Gator and GoDaddy. I still have a number of sites on GoDaddy, which is where I started off my WordPress career – I’m actually in the process of moving my sites to a new provider.
Aside: Two Reasons to Avoid GoDaddy
- It is a pain to get emails to send from GoDaddy. Check out this post on WordPress emails and GoDaddy. I did get them working for a while but every so often they would stop working and I’d have to spend ages setting it up again. It has been a problem on every GoDaddy site that I’ve built. Problems with emails means problems with contact forms which means total pain in the ass. If you want an easy life avoid GoDaddy.
- GoDaddy’s CEO shoots elephants and posts videos of them being butchered to the sound of AC/DC. N’uff said. (nb. Article link is interesting but the video is graphic).
How Do I Choose a Web Host?
- A good place to start is WordPress.org where they have recommendations of hosts to use.WPMU DEV also has a page with a few recommendations.
- You should also talk to friends and family about their own hosting. There’s nothing better than apersonal recommendation.
- Make sure it meets the minimum requirements for WordPress
- Always get Linux hosting – Windows hosting will cause you problems (I had a client ask me to install WordPress on Windows hosting… what a pain!)
- Shared hosting will be slower than dedicated hosting. Remember that the speed of your website will be affected by the number of people using that hosting. If you have just a basic low-traffic site then shared is fine, but for bigger, scalable sites you’ll need to use VPS or dedicated hosting.