9 Ways To Turbo-Charge Your WordPress Site
Over time your WordPress blog may start to run a little slower than you would like – this can be particularly frustrating for people visiting your site and can create a poor interaction experience.
In this post I cover 9 different ways you can optimize your site to get it running much more efficiently. The steps outlined are all very easy to implement, so it’s well worth taking the time to apply them to your site!
Install The WP Super Cache Plugin
The WP Super Cache Plugin is commonly used for speeding up WordPress sites. Once installed it should hopefully help your site run a little faster – it’s also particularly useful if you receive a large spike in traffic (e.g. you hit the front page on Digg). You’ll often see sites where the “Digg Effect” has resulted in the site going down – having a plugin like Super Cache installed and activated will help to reduce the risks of this happening to your blog if you get a sudden rise in traffic.
Delete Non-Essential Plugins
Take a look at the list of plugins you have installed on your site – are they all absolutely essential? If not, it’s time to get rid of them! That means actually deleting them from your site (as opposed to “deactivating” them) – this will make it easier to manage your plugins as you’ll only have those listed that are critical. You’ll also (potentially) see an improvement in your site’s responsiveness and speed depending on the number and types of plugins you’ve removed.
Reduce Your Image File Sizes
Most images that you include on your blog can be optimized and reduced in file size. Having smaller images obviously means that your pages will load faster – it’s worth getting into the habit of optimizing all of your images before publishing them. This can be done in Photoshop via the “Save for Web and Devices” option – play around with the different settings and try and reduce the file size of the image (without too much loss of image quality).
Divide Long Posts Across Multiple Pages
If you create a long post that contains lots of images it’s probably worth dividing it up over several pages. This will ensure that each individual page loads much faster and it will create a better interaction experience for your readers. Implementing this is very straightfoward – all you need to do is add the <!--nextpage--> tag in your post where you would like to create a page-break. You can learn more about this at: Styling Page-Links.
Remove The Potential For Hotlinking
Hotlinking is something that can result in slow page loading times for your site – but what exactly is hotlinking? Well, for example, if someone copies the URL to an image on your site and then uses that URL to display the same image on their site, they are essentially using your bandwidth as opposed to their own. If lots of people do this it can result in your site starting to run a little slow – however, it is possible to stop this happening. It requires making a change to your .htaccess file located in your site’s root directory.
Before doing anything ensure that you create a copy of this file which you can keep as a backup – then add the following lines of code to the file and save:
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?yoursite.com/.*$ [NC]
#RewriteRule \.(gif|jpg)$ - [F]
RewriteRule \.(gif|jpg)$ http://www.yoursite.com/HostYourOwnImages.gif [R,L]Make sure you tailor this code for your site – change “yoursite.com” to your actual domain name – also ensure that you edit the final line. This currently displays an image whenever someone tries to hotlink something on your site – so you might want to put something in place that advertises your own site or an image that may deter the person who is using up your bandwidth. It’s your choice
Optimize Your WordPress Database
Over time your database may need tidying up to make it more efficient – there is a plugin that will automatically optimize your database for you – it’s called Optimize DB and once installed will take care of everything. If you’d prefer not to install another plugin then you can do this manually – log into your web host’s control panel and then start up phpMyAdmin. You then need to select your WordPress database – choose “check all” (displayed in the screenshot below) and then select “Optimize Table”.
Switch off Post Revisions
Post revisions is a (potentially) handy feature that stores any changes you make to a blog post so that you can easily go back to a previous version if required. However, each time you make a change to a blog post a new row is added to a table in your WordPress database (i.e. to store details of the changes made) – many bloggers aren’t keen on this and feel that it’s overkill – especially for smaller blogs run by a single individual. You can stop this from happening by adding the following line of code into your wp-config.php file:
define('WP_POST_REVISIONS', false);Don’t Always Show Full Post Content
A mistake that some bloggers make is that they show their full blog post content on the index page of their site. If you display ten different blog posts on this page (which is the WordPress default) it creates a large amount of content – if each of these posts contains lots of images and other media (video, photos, etc.) it can result in the page taking a long time to load. A better approach is to display a subsection of the post with a link that allows your readers to view the full post if they choose (see the screenshot below). This is very simple to implement – in your index.php file swap the call to <?php the_content(); ?> to either <?php the_content(‘Read More…’); ?> or <?php the_excerpt(); ?>

Optimize Your Javascript and CSS
This may not have a drastic impact on the speed of your site, but every little helps! You can compress everything in these files to create a smaller file size – some great services for doing this include JavaScript Compressor and CSS Compressor. These will remove the formatting in the files, so it will make your code pretty much incomprehensible – therefore, you might want to keep a formatted version of these files locally, but upload the compressed versions to your server.
Conclusion
If you follow the steps above you should definitely see an improvement in the speed of your blog. This will make it much more responsive and your readers will certainly appreciate it! Do you have any other tips for speeding up WordPress sites? Please leave a comment below if you have any good suggestions.


















December 23rd, 2009 at 6:48 pm
Thanks for the tips, disabling hotlinks and optimizing database was very helpful!
December 24th, 2009 at 3:31 am
Cheers San – glad it was useful.
December 29th, 2009 at 7:05 am
This article has been shared on favSHARE.net. Go and vote it!
December 29th, 2009 at 11:27 am
Divide Long Posts Across Multiple Pages means more queries right? even with super cache on it still make more http request for each next post page that it makes
January 9th, 2010 at 9:25 am
this site is awesome. the themes are some of the best I’ve ever seen.
January 9th, 2010 at 10:17 am
Thanks Raza – appreciate your compliment
January 30th, 2010 at 1:13 pm
Great article!!! Very interesting information.
February 8th, 2010 at 9:46 am
Thanks, great article and you actually show us HOW not just the why!
March 31st, 2010 at 12:54 am
Concerning post revisions, when you say to “add the following line of code into your wp-config.php file” where exactly do you put it?
March 31st, 2010 at 1:29 am
I found the answer on the WP forums. For anyone who is interested here is what I did…
I did this and it worked. Now I don’t know if this matters or not, but for mine I added a comment before the code, like so…
/** Switch off Post Revisions */define('WP_POST_REVISIONS', false);
I went into my posts and checked and all the autosaves are gone.
March 31st, 2010 at 5:02 am
Thanks for posting this Doug.
March 31st, 2010 at 1:31 am
Doesn’t take much to describe a little more for people how and what they should do. It helps a lot instead of just saying, “You can stop this from happening by adding the following line of code into your wp-config.php file…”
May 16th, 2010 at 7:03 am
谢谢 学习了