WordPress is a great platform.
You’re seeing it in action right now: my site (which has tens of thousands of readers) is run entirely on this crazy-powerful platform.
One weakness that WordPress suffers from, however, is that it is usually very slow.
Without taking the right precautions, you could end up with a sluggish site that will not only be a hassle for repeat visitors, but will most certainly lose you subscribers and customers due to the impatient nature of web browsers.
First I want to go over why your WordPress site’s speed is important to your success, and next I want to go over ALL of the best ways that I’ve found to consistently.
If you want to get right to how you can speed up your site, scroll down.
If you want to learn why you should, read below.
Why Site Speed Is Important
You’ve probably heard this before, but when a person lands on your site for the first time, you only have a few seconds to capture their attention to convince them to hang around.
If you’ve been doing this online business thing for a while, you’ll recognize the importance of branding, a nice layout, putting important things above the fold, and all of that good stuff in order to try to capture visitors into staying.
But if your page loads slowly, you may lose people before you even have the change to convert them.
Most studies have confirmed that you have a very short time to load your site before people click away, especially if they’ve been linked there from another site that they visit.
Think about that.
Someone just gave you a good reference with a link, and yet you are doing both of you a disservice by having a slow loading site that nobody would want to wait around for.
Not only that, you are stunting your own growth by losing these potential subscribers, especially early on.
You have on average a single digit time frame before you lose somebody to a slow loading page.
That means if your site takes longer than 10 seconds to load, most people are gone, lost before you even had the change to convince them to stick around and give your blog or website a change.
Not only that, but Google has now included site speed in it’s ranking algorithm. That means that your site’s speed effects it’s SEO, so if your site is slow, you are not only losing visitors out of impatience, but you are also losing them by having reduced rankings in search engines.
So let’s see how we can fix that.
How To Speed Up WordPress
As a side note, these are not ordered by importance or any criteria, I’ve just gathered everything I’ve learned about speeding up page loads on WordPress and compiled them here.
I guarantee that using even a few of these will drastically speed up your site.
1. Choose a good host
While starting out, a shared host might seem like a bargain (“Unlimited page views, wowie zowie!”), it comes at another price: incredibly slow site speed and frequent down time during high traffic periods.
If you plan on doing awesome stuff (aka the kind of stuff that creates high traffic periods), you’re killing yourself by running your WordPress site on shared hosting.
The stress of your site going down after getting a big feature is enough to create a few early gray hairs: don’t be a victim, invest in proper hosting.
The only WordPress host I continually recommend is below… (drum roll please…)
- WP Engine (aff link)
My sites are always blazingly fast, never have downtime when I get huge features (like when I was featured on the Discovery Channel blog!), and the backend is stupidly simple.
Last but not least, support is top notch, which is a must when it comes to hosting… take it from a guy who’s learned that the hard way!
Head on over to the WP Engine homepage and check out their offerings, you’ll be happy you did.
2. Start with a solid framework/theme
You might be surprised to here this, but the Twenty Ten/Twenty Eleven “framework” (aka the default WP themes) are quite speedy frameworks to use.
That’s because they keep it the “guts” simple, and light frameworks are always the way to go to have a speedy site.
From my experience, the fastest loading premium framework is definitely the Thesis Theme Framework (aff).
Whatever you might say about it’s SEO abilities (I prefer to use plugins and my own edits), it is definitely a solid framework for quick page loads, I’ve always had this experience as have many others.
3. Use an effective caching plugin
WordPress plugins are obviously quite useful, but some of the best fall under the caching category, as they drastically improve page loads time, and best of all, all of them on WP.org are free and easy to use.
By far my favorite, bar none, is W3 Total Cache, I wouldn’t recommend or use any other caching plugin, it has all of the features you need and is extremely easy to install and use.
Simply install and activate, and what your page load faster as elements are cached.
4. Use a content delivery network (CDN)
All of your favorite big blogs are making use of this, and if you are into online marketing using WordPress (as I’m sure many of my readers are) you won’t be surprised to here that some of your favorite blogs like Copyblogger are making use of CDN’s.
Essentially, a CDN, or content delivery network, takes all your static files you’ve got on your site (CSS, Javascript and images etc) and lets visitors download them as fast as possible by serving the files on servers as close to them as possible.
I personally use the Max CDN Content Delivery Network on my WordPress sites, as I’ve found that they have the most reasonable prices and their dashboard is very simple to use (and comes with video tutorials for setting it up, takes only a few minutes).
There is a plugin called Free-CDN that promises to do the same, although I haven’t tested it.
5. Optimize images (automatically)
Yahoo! has an image optimizer called Smush.it that will drastically reduce the file size of an image, while not reducing quality.
However, if you are like me, doing this to every image would be beyond a pain, and incredibly time consuming.
Fortunately, there is an amazing, free plugin called WP-SmushIt which will do this process to all of your images automatically, as you are uploading them. No reason not to install this one.
6. Optimize your homepage to load quickly
This isn’t one thing but really a few easy things that you can do to ensure that your homepage loads quickly, which probably is the most important part of your site because people will be landing there the most often.
Things that you can do include:
- Show excerpts instead of full posts
- Reduce the number of posts on the page (I like showing between 5-7)
- Remove unnecessary sharing widgets from the home page (include them only in posts)
- Remove inactive plugins and widgets that you don’t need
- Keep in minimal! Readers are here for content, not 8,000 widgets on the homepage
7. Optimize your WordPress database
I’m certainly getting a lot of use out of the word “optimize” in this post!
This can be done the very tedious, extremly boring manual fashion, or…
You can simply use the WP-Optimize plugin, which I run on all of my sites.
This plugin lets you do just one simple task: optimize the your database (spam, post revisions, drafts, tables, etc.) to reduce their overhead.
I would also recommend the WP-DB Manager plugin, which can schedule dates for database optimization.
8. Disable hotlinking and leeching of your content
Hotlinking is a form of bandwidth “theft.” It occurs when other sites direct link to the images on your site from their articles making your server load increasingly high.
This can add up as more and more people “scrape” your posts or your site (and especially images) become more popular, as must do if you create custom images for your site on a regular basis.
Place this code in your root .htaccess file:
disable hotlinking of images with forbidden or custom image option
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?sparringmind.com [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?google.com [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?feeds2.feedburner.com/sparringmind [NC]
RewriteRule \.(jpg|jpeg|png|gif)$ – [NC,F,L]
You’ll notice I included my feed (from FeedBurner), you’ll need to replace it with your feed’s name, otherwise your images won’t appear correctly there.
9. Add an expires header to static resources
An Expires header is a way to specify a time far enough in the future so that the clients (browsers) don’t have to re-fetch any static content (such as css file, javascript, images etc).
This way can cut your load time significantly for your regular users.
You need to copy and paste the following code in your root .htaccess file:
ExpiresActive On
ExpiresByType image/gif A2592000
ExpiresByType image/png A2592000
ExpiresByType image/jpg A2592000
ExpiresByType image/jpeg A2592000
The above numbers are set for a month (in seconds), you can change them as you wish.
10. Adjust Gravatar images
You’ll notice on this site that the default Gravatar image is set to… well, nothing.
This is not an aesthetic choice, I did it because it improves page loads by simply having nothing where there would normally be a goofy looking Gravatar logo or some other nonsense.
Some blogs go as far to disable them throughout the site, and for everyone.
You can do either, just know that it will at least benefit your site speed if you set the default image (found in “Discussion”, under the settings dab in the WordPress dashboard) to a blank space rather than a default image.
11. Add LazyLoad to your images
LazyLoad is the process of having only only the images above the fold load (i.e. only the images visible in the visitor’s browser window), then, when reader scrolls down, the other images begin to load, just before they come into view.
This will not only speed you page loads, it can also save bandwidth by loading less data for users who don’t scroll all the way down on your pages.
To do this automatically, install the jQuery Image Lazy Load plugin.
12. Control the amount of post revisions stored
I saved this post to draft about 8 times.
WordPress, left to its own devices, would store every single one of these drafts, indefinitely.
Now, when this post is done and published, why would I need all of those drafts stored?
That’s why I use the Revision Control plugin to make sure I keep post revisions to a minimum, set it to 2 or 3 so you have something to fall back on in case you make a mistake, but not too high that you clutter your backend with unnecessary amounts of drafted posts.
13. Turn off pingbacks and trackbacks
By default, WordPress interacts with other blogs that are equipped with pingbacks and trackbacks.
Every time another blog mentions you, it notifies your site, which in turn updates data on the post. Turning this off will not destroy the backlinks to your site, just the setting that generates a lot of work for your site.
For more detail, read this explanation of WordPress Pingbacks, Trackbacks and Linkbacks.
14. Replace PHP with static HTML, when necessary
This one is a little bit advanced, but can drastically cut down your load time if you are desperate to include page load speeds, so I included it.
I’d be doing this great post injustice if I didn’t link to it for this topic, as it taught me how to easily do this myself, in a few minutes.
So go there and check it out, it wrote it out in plainer terms than I ever could!
15. Use CloudFlare
This is similar to the section above on using CDN’s, but I’ve become so fond of CloudFlare since I discussed it in my best web analytics post that I’ve decided to include it separately here.
To put it bluntly, CloudFlare, along with the W3 Total Cache plugin discussed above, are a really potent combination (they integrate with each other) that will greatly improve not only the speed, but the security of your site.
And, both are free, so you have no excuse!
Thanks for reading, please share this article if you enjoyed it.
of Sparring Mind, the behavioral psychology blog with over 100,000+ awesome readers and a highly popular newsletter.
{ 65 comments… read them below or add one }
Great Post Greg! I’m a huge fan of your blogs and this post will drastically improve my web page load time. I’m using the Headway Themes framework the drag and drop theme. How is the speed on this theme? I’ve seen a few blogs utilize it like http://www.chrisg.com and his appears to load quickly.
Hey Christian, thank you for the kind words, I appreciate it.
I have not personally used the Headway Framework (although I have played around with it on a friend’s site, and it seems awesome!).
Therefore I cannot speak specifically to it’s speed, although I have heard good things about it.
Keeping things minimal with just the right amount of flare, and having a CDN and caching system in place should be good for most blogs.
That ChrisG site is a good example, it was quite clean and speedy when I visited it.
This is a very useful article on speeding up your website loading time. I’m going to do the gravatar one straight away. Number 8 seems very good to do, but as I’m extremely new to wordpress, I don’t trust myself doing it. In fact, I may not even be able to find the file you mentioned
Of course I can do number 6 as well. Off to do what I can. Thanks again for this post. I’m actively looking to help my new site load faster.
No problem Anne!
I wanted to include a few less technical changes as well as a few technical ones for people who had already started some of the basics in speeding up their site.
Glad to see you using WordPress, I think you definitely made the right choice!
If you need help with certain aspects, feel free to ask, I will be glad to help you with whatever I can.
Many thanks for these suggestions, most of which I hadn’t heard of or thought of before.
Anne Lyken-Garner and others might prefer to use a ready-made plugin to disable hotlinking (item 8). There are several. This one works and doesn’t require you to find or make an htaccess file — http://wordpress.org/extend/plugins/wordpress-automatic-image-hotlink-protection/ .
Roger
Glad you enjoyed the post Roger, and thanks for your contribution!
Wow Greg, that was a great list of tips. Now on #8, disable hotlinking, where you have your feed listed, those are sites allowed to hotlink, it that right? So if I wanted to allow certain sites I would add them there?
I’m going to need the Revision Control plugin for sure. I revise/edit my posts 20 or 30 times before I publish. I didn’t realize that was adding a load to the site. Thanks.
Thanks Brian, glad you enjoyed the post!
While I love the Revision Control plugin, I’ve found that it might be easier just to totally refresh your databases with WP-Optimize (it also gets rid of post revisions).
Find it here: http://wordpress.org/extend/plugins/wp-optimize/installation/
I pretty much use it after every blogging session now.
Thanks Greg, I just installed it and cleaned up over 800 post revisions. Very cool.
No problem Brian, it definitely makes cleaning up the back end of your WP site really easy, it’s been a go-to plugin for me ever since I found it.
Great tips, i wrote an article very similar to this one for speeding up Wordpress blogs.
Thanks Tony, glad you enjoyed it!
Great stuff Greg! There are a few things here even I didn’t know about!
Thanks man, I tried to scour the web in addition to what I already knew, and I came out learning some stuff too!
Greg -
2 quick questions for you, if you get a minute.
1. If I use a CDN like MAXCDN will it affect images already on the site or only images uploaded after that?
2. I’ve noticed in a few of your posts several different plugins. I was curious if you ever run into using too many? I try to stay below 10, but implementing a lot of what you recommend may take me close to 20.
Good questions, for the first I would give an answer, but I think your best bet is to ask the source for the most accurate info, I’m sure MaxCDN support would be glad to help.
As for plugins, generally I do NOT notice a speed dip due to amount, the one exception being SOCIAL PLUGINS, because those damn buttons always slow a site down.
I’d advise using as few as you need though, but I wouldn’t worry about adding something on the backend, any plugin that might slow your site down is going to be something *visible* like the social plugins I mentioned.
Certainly will. Very impressed by your dedication. Keep up the good work!
Very nice post! #11 is awesome!
Hi, Greg,
Could you clarify CloudFlare vs. CDN? To what extent do they do the same thing? And can you run both at the same time?
Thanks!
I use Cloudfare on my website but use Quick Cache – I think it could be a little quicker but overall things are ok.
You increased our page load times dramatically. GREAT ADVICE!
Great work.
w3tc + cloudflare gives better results .. just try tis
http://www.krizna.com/wordpress/how-to-improve-wordpress-performance/
hey thank you bro just today am started my blog…all use full plugin in ur blog thanks..
Thanks for sharing – Database a lot faster since I optimised it in phpmyadmin!
Keep up the good work
admin which 1 is good WP Super Cache or W3 Total Cache ??
Excellent advice, much I’ve given to my own clients and audience. However, a point that needs more emphasis is that it often isn’t WordPress that slows things down. In fact, it rarely is WordPress specifically, as you have pointed out with the storing of video and other content offsite on the cloud, hosting, and cache issues.
WordPress out of the box is sweet. Fast. A slick race car. It is what we do with it that slows it down. We add massive images to our WordPress Themes. We ask it to spin, whirl, and click in ways that torture databases, servers, and storage space. We add functionality that may serve a purpose for you, but not for your readers, thus making them pay for slower speeds based upon your needs, not theirs.
We choose WordPress Themes and Plugins that are not optimized for speed or efficiency, sometimes out of date or not as efficient as another just like it. We add CAPTCHAs and stupid human tricks to test for spammers instead of using Akismet and trusting it to do the efficient job it does. With a growing majority of comment spam produced by humans, these dumb tests are easily passed and the spam goes on. We add all kinds of functionality that doesn’t make sense in the long game, but served a purpose at the time, them time passes and we forget, and these clog up the system.
There are many reasons that a WordPress site slows down and cramps up, but it isn’t WordPress that is the issue. It is what we do with it once we get it into our tweaking hands.
Thanks.
Great article, just from using the W3 cache plugin my site went from a mind numbingly slow 8s load time to 2s , Thanks!
Simply the BEST resource I have seen — thanks.. One question, though, is I have heard the WP SMUSH IT is not playinng nice with WP updates, and that this is better– EWWW Image Optimizer..
Any thoughts on the matter?
Nice share.,
thx
Followed most of the suggestions on this post, and my site is way faster! It not only feels faster, but my Google Analytics reports show a huge improvement. This should buy me some time to grow until I need to move on to a new host. Thanks!
optimizing css will show great results http://www.psdpakistan.com/webdesigning/wordpress-website-optimization/ this might help too..
Awesome post. Just adding the wpe cache plugin took my client’s site from a D on GTMetrix.com to a B — implementing several of the other techniques right now
thanks for very informative article.
OK, Graig now that i am getting a warm feeling about the blog I am going to share some ” Secrets ” about speeding up WordPress to its craziest limits
There is 6 practices that matters, You already mentioned 3 ( Caching, CDN, and primarily the web host ) , there is also
1: Using a static Domain and set it to be cookieless ( YouTube uses Yimg.com Facebook uses fbcdn.net and the list goes on )
2 : Using CSS and Images Sprites by combining the theme core files into one image and one CSS file which helps in minimizing HTTP requests
3 : Deferring Parsing JavaScript, the technique is quite complicated but it makes a huge difference
Great article man! these plugins are really helpful for my site
excellent article .. really helped me to understand how wp is exactly working : )
Really nice info for newbies such as me…
Thank you for the info.
I only have to abject about the free CloudFlare service.
Some time, before reading your post, I tried it hopping for some speed gain.
Well, according to pingdom and other websites, the speed were smaller.
Yes, it offers good security.
I’m using CloudFlare now and love it, but the other day their site crashed for about 1.5 hours. I hear this happens often and that using cloudflare also reduces your seo rankings. Do you still use this and do you have any thoughts on this? Thanks
There’s a lot of meat here. I’ve started down this list but want to warn the audience that W3 Total Cache can give you trouble. It worked on one site but made the other one stop operating until I connected with terminal and removed it using command line (instructions for this available using Google: “command line remove W3 Total Cache”
Also, checkout PingDom.com and see what images/objects are slowing your site down. I discovered a few 200-300Mb images I needed to compress.
Thanks. Really great article. I had cloudflare and WP Total Cache which reduced my load time a lot. I emplemented some of yours and got it down further.
Does the lazy load plugin need configuring at all couldn’t see new options for it.
As far as I remember, there isn’t much to configure. Glad this post helped out!
I’m using Headway themes and realized that after building a site, it became bulky and needed some optimizations to increase its speed and I found that your blog post on Speeding Up Wordpress helped me with choosing a good CDN to manage plus Cloudflare. Thanks for sharing.
I thought we didn’t have to configure the WP Total Cache Plugin but look what this guy says.
‘Also, these next steps are critical. Make sure to tweak the default settings, otherwise, design changes on your site may be out of date unless the cache is cleared. On the “Browser Cache” section, navigate to the “CSS & JS” section, as well as the “Media and Other Files” section, and change the “Set Expires Header” to 604800 seconds’.
http://www.mvestormedia.com/easy-w3-total-cache-configuration/
Hi thanks for this informative article.
few questions
1. If i do use these plugins and there will some problems in the site functionality then how can i undo the changes?
2. If the performance of the site is not increased and i want to remove the plugins then will it effect the site or after removing the plugin the site will run as it is running now?
Thanks for this informative list. I was using a few of these but now have plenty more to investigate. Thanks!
Thanks for the great article.
Great write up. Also take a look at the online tool from GTMetrix. It runs some testing on your site and then returns recommendations for speeding it up. It currently pulls information from YSlow and Google Page Speed Insights.
Just want to say thanks. This post was perfect, easy to follow, & understand. Exactly what I wanted!
Thank you for your useful advices, it sure helped to improve my site, except I use another cache plugin, the W3Total cache has too many options…hard to configure.
Thank you it’s helpful. I’ll be glad to come back here again. All your posts is useful.
Thank you for these great tips. I’ll definitely apply these once I can hopefully get started
I’m trying to upload Headway Theme to WP but it’s already been half an hour since I hit install and still not budging. Is it normal that installation could take so long…if you or anyone else here is using Headway??
Wow, this is a very useful post, no doubt that you have ready optimized and speed up your blog as it ranked no 1 on google page search of keyword “How to speed up a blog”.
Great job greg, i am looking for more methods of speeding up my blog. I have tried some of the tips here. Thanks for sharing.
really nice info
i have some more info on this topic http://www.shouthard.com/speed-up-wordpress-website/ go to this link n see
My site load time is critically low.. but i was able to optimise 1 or two things there, then i activata wp cache.. which does the dirty work of managing the cache
i also add the line to my htaccess file … that help a little too with compressing the homepage and files
# compress text, html, javascript, css, xml:
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
# Or, compress certain file types by extension:
SetOutputFilter DEFLATE
Great post!! Very useful plugins mentioned; thank you.
Thanks, you really helped me get my site going faster.
).
I really appreciate the tip about static resources expires header. That one really did the trick for me and I was looking for the semantics for quite some time (finally found it
Do you have any tips for speeding up wordpress running woocommerce?
Thanks
Elektrynka
Any fresh news on Free CDN plugin.
I signed up for Cloudflare from you link
i subscribed to your mail service (& confirmed) having difficulty in downloading ebook.
Any chance you can contribute to my topic (site, service & book) on sustaining motivation to slim.
George.
Any fresh news on Free CDN plugin.
I signed up for Cloudflare from you link
i subscribed to your mail service (& confirmed) having difficulty in downloading ebook.
Any chance you can contribute to my topic (site, service & book) on sustaining motivation to slim.
GOT the book thanks – be reading tonigh
George.
Good stuff.
I came across this last night and followed as many as I could (I’ve not yet implemented the .htaccess tweaks). Combined with a general clean-up of my inactive plugins I’ve seen site load times increase demonstrably.
However, the Free CDN plugin caused my site some ugliness.
Great blog with golden advice. Appreciate this!
Very nice tips. Keep it up.
helpfull information
i use in my site Quick Cache ( Speed Without Compromise )
I appreciate the tips, utilizing them now!
Great information, thank you for sharing it. Note typo “You might be surprised to here this” / hear