10 Steps to Double Your WordPress Page Loading Speed

10 Steps to Double Your WordPress Page Loading Speed

It is a well-known fact that fast-loading pages improve the user experience. Since the page loading speed is a major factor determining search rankings optimizing our pages for better speed must be a high priority thing. If you have been blogging for quite a while, you know that as your traffic increases, your blog’s loading time become slower and slower. This could be due to inefficient coding, too many images and advertisements or just that you have too many plugins that take up your valuable server resources. In this post I am sharing 10 steps I did to double my website speed.

1. Use Cache Plugins

This single step will help you to increase your page loading speed all most double. WordPress platform is built in PHP language. PHP files will usually take more execution time than static html files. Caching generates static html files from your dynamic WordPress blog. After an html file is generated your webserver will serve that file instead of processing the comparatively heavier and more expensive WordPress PHP scripts.

The most popular cache plugins are W3 Total Cache and WP Super Cache. Between these two I prefer W3 Total Cache because it gives better performance. But unfortunately some web hosts support W3 Total Cache and in some rare cases it may break your theme. If that is the case then go for WP Super Cache.

Actually I am surprised by the fact that many bloggers are still not using any caching plugins in their blog. It is a must have plugin and it will boost your blog performance dramatically. The configuration of the plugin may cause slight confusion if you are using it for the first time. If that is the case please comment your problem or a drop a question and I will try to help you.

Related Reading: Speed up your WordPress blog using WP Super Cache

2. Optimize Images

An image is worth more than many words. Adding images to blog posts is a good practice to improve user experience. But images are the slowest loading element in a web page. Nowadays most themes are image oriented and use lots of pic such as thumbnails, gravatar, social sharing icons etc. We can’t reduce the number of images after a certain limit, so the best way is to optimize the images we have. A plugin which comes very useful in this context is WP Smush It.

WP Smush.it is a free WordPress plugin which will automatically optimize all images already uploaded or new images. It converts GIFs files to indexed JPGs, it strips unused space from the indexed images and make the images loading faster by reducing its size. Images sometimes have all sorts of metadata attached that aren’t needed, and sometimes they could just be smaller by compressing them in a smarter way without losing any quality.  Yahoo’s Smush.it uses optimization techniques specific to image format to remove unnecessary bytes from image files. It is a “lossless” tool, which means it optimizes the images without changing their look or visual quality. Smush.it offers an API that performs these optimizations (except for stripping JPEG meta data) automatically, and this plugin seamlessly integrates Smush.it with WordPress.

All you have to do is just install this plugin and then everything will run automatically. Whenever you upload a new image it will be automatically run through Smush.it behind the scenes. You don’t have to do anything different.

Use image heights and widths: Adding height and width tags to images helps a lot to improve the loading speed. If the browser knows the width and height size of the image, then it can let it load in the background. If those tags are not used, the browser has to wait until the image loads.

3. Optimize the database

Speed and performance of WordPress blogs highly depend on its database. Most of the cases, a WordPress blog is slowing down due to unnecessary WordPress post revisions, Orphan entries and Spam comments. Every time when you save a new post or pages, WordPress creates a revision of that post or page. If you edit a post 5 times you might have 4 copies of that post as revisions. Just imagine if your post or pages are long and big, it will be a huge number of bytes that is on your MySQL overhead.

a. Optimizing Database Tables

Wp- Optimize is a simple but effective plugin which allows you to clean up and optimize your WordPress database. This plugin helps in boosting your database performance by removing post revisions, removing auto draft posts and spam comments. It will help you to apply MySQL optimize commands on your database tables without phpMyAdmin. Make sure to regularly optimize your database to keep your MySQL database performance.

b. Remove Orphan Entries

Deactivating and removing of a plug-in doesn’t necessarily remove its table entries on WordPress database. These tables and record entries are cluttering your WordPress database and will effect to your WordPress blog, even if not much. Removing these unwanted orphan entries will reduce the database size and improve its performance.

One of the easiest ways to remove orphan entries is by using a small plugin called Clean Options which find and remove orphan entries from the wp_options table. It can help save you a few KBs or MBs depending on how many plug-ins you uninstalled before you installed “Clean Options” plug-in on your WordPress blog. I used this plugin yesterday and found 311 unwanted entries in my wp_options table.

4. Use a Content Delivery Network

Content Delivery Network or CDN is a distributed cluster for your content delivery. It is a system of computers containing copies of your data, placed at various geographical locations so as to maximize download speed and availability of the data.

There are a lot of CDN services available but my favorite is MaxCDN. They have got hundreds of servers throughout the globe and at a cost of 40$ for 1TB per year, I think it is a worthy investment.  You can host multiple blogs and 1TB is more than enough to power 10 blogs of the size of this blog. In case if you not interested in spending money then there is a free alternative called SpeedyMirror, but there is a considerable difference in the performance.

5. Enabling Gzip Compression.

Gzip is the most popular and effective compression method supported by almost all browsers. Gzipping as many file types as possible is an easy way to reduce page weight and accelerate the user experience. By using GZIP Compression, the server takes the request from the client, then looks for the file and compresses it before returning to the client. The browser then will decompress the data and display it. This way will save times, decrease the bandwidth as well as the page size. There are two ways to enable Gzip compression.

a) Techie’s Way:

If you are brave enough to edit your .htaccess file then add the following line of code to it.

<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/xml text/css text/plain
AddOutputFilterByType DEFLATE image/svg+xml application/xhtml+xml application/xml
AddOutputFilterByType DEFLATE application/rdf+xml application/rss+xml application/atom+xml
AddOutputFilterByType DEFLATE text/javascript application/javascript application/x-javascript
AddOutputFilterByType DEFLATE application/x-font-ttf application/x-font-otf
AddOutputFilterByType DEFLATE font/truetype font/opentype
</IfModule>

b) Non Techie’s Way

This way is very simple; just install a Gzip plugin for your blog.

6. Remove all unwanted plugins and widgets

Plugins are the most attractive feature of the WordPress CMS, but it can cause some troubles also. Every plugin gets loaded and executed even if they are not in use. If you are a person who depends on plugin for everything then your blog performance will affect severely. Try to replace as much plugin with manual coding and keep your existing plugin updated.

This is same for widgets also. Many people fill their sidebar with a lot of unwanted widgets like live score, news etc. This can be look stylish, but increases a lot of you loading time.

7. Choose a good Webhost

One of the major factors affecting the page loading speed is the performance of your webhost. If you are using a free webhost then you may already trouble with slow speed. Opting for a local hosting company may looks like a bad idea when your blog is accessed from different parts of the world. Local hosting companies can be a good choice if you are having a country targeted static websites. But most blogs are dynamic and will have readers in many countries. So opting for the service of a reliable paid webhost like HostGator, GoDaddy, BlueHost etc. will be a good choice. Free webhosts have limited resources and so they put so many users in shared servers, which in effect slow down the servers. Also make sure to upgrade your hosting plans at each stage of your blogging. Once you reach a level of 7000 visitors per day, upgrade to a Virtual Private Server.

While it comes to web hosting HostGator is my personal favorite. The performance is very good and support is awesome. At a reasonable price of under 5$ per month I think they offer good value for money.

8. Use an optimized theme

One of the main reasons why I moved to this new design is that my previous theme was very slow in loading. Premium themes often have better loading speed than free ones because they are well coded. A complex CSS coding of a theme will certainly increase the page load time. The CSS coding should be as simple as it could. Free themes usually have many bugs in it because the developers may not spend much time for finding and fixing errors. So if possible go for a paid theme.

9. Reduce the advertisements and host affiliate banners yourself

Filling your page with lot of advertisements will affect user experience as well as slow down your website. So keep the number of ads to the minimum and try to avoid pop ups and pop unders. Inline advertisements like Infolinks can be an extra source of income, but such ads will affect your page loading speed.

If you are in the affiliate marketing then you will have affiliate banners in your blog. Many affiliate merchants provide banners or buttons that can be served from their site. However, for many banners and buttons, it will take time to load the images onto your own site and serve them from there. So it is a better idea to host the banners yourself and then use it in the code.

10. Keep everything updated

Last, but not the least make sure everything is up to date. If a new version of WordPress, plugins or themes are available then try to update it as soon as possible. Every new release comes with fix for the bugs in the previous release so make sure to keep your plugins and themes updated.

These are some of the steps I used to increase the page loading speed. Since it is a major factor determining search rankings and improving user experience I suggest you to spend some time on this. The steps and plugins described in this post may be a little confusing to non techie’s, if that is your case please leave a comment or ask a question (that is a new feature, hope you find it useful) and I will try to help you.

  • http://www.geeks4share.com Praveen @ Geeks4share

    You forgot about script compression!
    Compressing CSS and javascripts files will also help us to improve the blog speed.

    Nice Post, Cheers :)

    • http://www.rojish.com Rojish

      Haha.. first I thought about including that, then dropped the idea because the post is already 1800+ words :D

      Yes, compressing CSS and Javascripts is a good method to improve page loading speed.

      • http://www.techatlast.com Olawale Daniel@SEO Tips

        @Rojish, you always write awesome posts that helps other bloggers in getting a lasting solution to their blogging needs. Thanks a lot for this awesome information..

        • http://www.rojish.com Rojish

          Thanks buddy, you can expect more such posts :)

  • http://www.rsatechnologies.in rakesh kumar

    You forget to advise about Google Page speed. It can really help a lot if you are trying to load your site faster. I am happy that my site loads in less than 2.5 sec

    • http://www.rojish.com Rojish

      Ya, it is very useful tool in analyzing our page and get useful suggestion. I am happy to have a page score of 85/100 which seems good :)

      Thanks for the comment Rakesh.

  • Anish

    Really nice info…its definitely help us to increase our page loading speed

    • http://www.rojish.com Rojish

      Welcome to my blog and thanks for the comment Anish :)

  • http://www.7chip.com sibin

    Hi Rojish is there is any speed up method for blogspot users.I think Google hosting better than any other hosting……….

    • http://www.rojish.com Rojish

      I am not that expert in Blogspot blogs because I haven’t used it much. But some common suggestions are compressing CSS, using a simple template (preferably with white back ground), reducing the number of sidebar widgets etc.

  • http://www.FAQsPedia.com shyam jos

    this is the best post i ever read from you :P

    WP Smush.it is really worth installing ?

    where to add the gzip code in .htaccess file ? above or below ?

    • http://www.rojish.com Rojish

      Hahahaha there are better posts coming soon :D

      WP Smush It is an extremely useful plugin and it is a must have for every blog.

      You can add GZip code anywhere in the .htaccess file, preferably below.

  • http://bodynsoil.com/blog/ bodynsoil

    Great post, I wanted to speed up my blog and set today aside to research and do just that. Your blog post came along at just the perfect time for me.

    I have installed a few plugins you suggested and now I am off to test my new load speed.

    Have a great day.

    • http://www.rojish.com Rojish

      I hope your website speed got increased now :)

      Thanks for stopping by and commenting.

  • http://techtricksworld.com Atish @ Blogging tips

    Very informative..I think you are very good at plugin. I will use few of them.

  • http://www.bankrollmob.com Felicia @ No Deposit Poker

    Unnecessary plugins are mostly what causes many wordpress blogs to slow down. Many bloggers do not realize this simple mistake. It is important that they remove unnecessary plugins and retain only those that are important.

    • http://www.rojish.com Rojish

      Unnecessary plugins are one of the main reason for slow loading speed. There was a time where I had more than 50 plugins in my blog and I was suffering from slow loading speed. But now I replaced most of them with manual coding and the page speed improved considerably.

      Thanks for the response Felicia :)

      • http://www.bankrollmob.com Felicia @ No Deposit Poker

        Hi Rojish,
        You’re welcome! Thanks to your post, I’m actually trying to use everything you said here to speed up some sites I’m working on.

  • Zarah Alvie

    Hi Rojish,

    There are a few other things you can do such as

    1. offsite caching of images
    2. there is a plugin called Digg Defender, though I am not sure how well it works with 2.1
    3. don’t show PPC advertising

    Although worth more consideration is how you optimise to convert that traffic.

  • Adam James

    A brilliant article, cheers.. completely agree about W3 total cache, it does seem to improve loading times much more than WP supercache in A/B testing.

    A few new steps to me too, thanks.

  • http://read2learn.net Kent Mauresmo | Read to Learn

    I use Gzip. I had a ton of problems with that W3 plugin. Its messed up my blog

  • http://www.techmaniaq.com/ renny

    thanxz for ur info bro was really helpfull

    • http://www.rojish.com Rojish

      Thanks for the comment Renny :)

  • http://www.symplyfyd.com Ajay s bisht

    Another great post..i m using swift theme and already getting loads of comments on the speed of my blog..now i will use these tips to make it even faster…thanks a lot Rojish…

    • http://www.rojish.com Rojish

      Ya, themes have a great effect on the page loading speed. Optimized themes with less coding errors always load faster.

      Thanks for the comment Ajay :)

      • http://www.symplyfyd.com Ajay s bisht

        Anytime buddy..
        this time i am going through your blog and loving it..you have tons of good content in your blog…

  • http://www.cravingtech.com Michael Aulia @CravingTech.com

    Great tips! Thanks for introducing me to maxcdn – $40 / a year is not much and a the moment I’m still using Cloudflare, a free CDN service but thinking to upgrade it at some point in the future

    • http://www.rojish.com Rojish

      I used both MaxCDN and Cloudflare, I must say MaxCDN is much better than Cloudflare. I am sure that is a worthy investment.

      Thanks for the comment Michael.

      • http://www.cravingtech.com Michael Aulia @CravingTech.com

        Good to know. I might move when I’ve decided to invest further in this area :)

  • Harry Sehgal@Adsense and BloggingTips

    Wp-Optimize is a good plugin but it will consume CPU memory of the Host Provider, so that means there are high chances of gettinf the Account Banned. I myself has faced this Issue. Nice Post.

  • http://womenshealthstories.com/ Sheryl

    Hi Rojish, thanks for Wp smush plugin. I really need that, ’cause sometimes I use large images for my blog. Then, how about videos, can it reduce my blog loading speed? any recommendation plugin for that? btw, I’m not upload directly to my blog, I just embed from youtube. Thanks for sharing :-)

    • http://www.rojish.com Rojish

      WP SmushIt is a very useful plugin which make significant changes to the page loading speed. About embeded Youtube videos as of now there is no special plugins which makes it load faster, but the Youtube team is working on new technologies to make the videos load much faster, so we can expect good changes soon :)

      Thanks for the response Sheryl, have a great day :)

      • http://womenshealthstories.com/ Sheryl

        Yep, I’ll try that one. Thanks for replying Rojish. Have a great day too :-)

  • http://drdreheadphones.net/ Leah Madison

    Hi Rojish
    I have been using WP super-cache, however google analytics reports that the site as very slow – over 4 seconds to load a page but Y-Slow says less than 1 second per page. The problem might be that ‘super cache’ turns off caching for ‘bots’? I tried ‘simply static’ and it came back at less than 1 second per page, however after I upgraded to WP3 ‘simply static’ seemed to stop working? Any ideas?

  • http://www.usedtiresblog.com tires

    Good tips. Optimizing images is what helped me the most. At first, I’d use PNG as I felt they provided the best quality but soon I adopted JPG format whenever I needed to use images. Using ACD See, I would even reduce the quality percentage a bit as the difference visually was negligible but file size-wise, quite a bit of saving.

    -Jean

  • rajesh

    hello
    thnx to use optimze theme is one of the best thing to get ur webpage speed double and wp-super cache thnx for this featured article it is going to help new bloggers a lot

  • http://www.AshikNesin.com Ashik Nesin

    Thanks for the useful Tips Rojish. Just done all these steps and my blog is loading much faster than ever

  • http://techgenra.com/ sai krishna

    your six points are very useful :)