How to Speed up your WordPress blog

How fast your WordPress website load? does it load in 2 second or less or it takes more than that. Well, if it takes more than 2 seconds then you should need to be worrying because

According to a study

  • 47% of consumers expect a web page to load in 2 seconds or less.
  • A one second delay in page load can result in a 7% reduction in conversions.
  • If an e-commerce site is making $100,000 a day, a One second page delay potentially cost you $2.5 million.

Even Google takes Page loading speed as one of the search engine ranking Factor

These stats must have informed you how important page reasponse time really is. So, the question is How to improve your page load speed?

How to find your WordPressWebsite Page loading speed?

  • Google developers – This tool is created by almighty Google and gives you score out of 100. If your site scores more then 90 than there is not much to do but if your site score less than 90, buckle up your belt you have some things to take care off.
  • Gtmetrics – It’s my favorite tool and provide some great insights by giving grades on both Google Page speed and YSlow.
  • Pingdom – This tool helps you analyze the load speed of your websites and lets you identify what about a web page is loading fast, slow or is too big.

Speed up your WordPress blog

How to increase your WordPress Website loading speed?

So, now we have checked our site loading speed , our next step is to use necessary methods to reduce the site loading time.

Plugins to optimize your Website

W3totalcache: W3total cache is one of the best WordPress plugin to improve site performance. It cache browser, page, objects, database and more. This plugin also allows you to configure CDN provider within Itself.

WP optimize – Your WordPress blog create post revision by default and as your blog grows older your blog create more and more revision. These revision will occupy a lot of space which will affect your Website performance. This plugin allows you to delete all those revision in just one resulting a increase in overall Website performance.

Ewww Image optimizer – To make our blog more catchier we most likely use images in articles but this could result in increase in page load time. This WordPress plugin will compress all your images and improve your page loading speed.

Regularly Optimize your WordPress Database

Database stores everything about your WordPress Website. WordPress uses the database to store posts, comments, pages, settings and plugin information. Whenever a page is loaded on your Website, it reads the database. If your database is heavy, the information may take longer to be displayed.

Make sure to  scan for outdated tables in your Website that weren’t deleted when you removed old plugins. WP-Optimize is one such plugin that reports you about the wasted spaces in database Tables and allows you to shrink those unwanted spaces. Other then optimizing your Website database WP-Optimize also lets you delete thousands of spams and un-approved comments in your comments table with a single click.

Just like spam comments, thousand copies of old post revisions make your database heavier which results in slowing down the speed of your website. WP-Optimize also allows you to delete all of the saved post revision in just a matter of seconds.

Lazy Loading of Images

According to Wikipedia – “Lazy loading is a design pattern commonly used in computer programming to defer initialization of an object until the point at which it is needed. It can contribute to efficiency in the program’s operation if properly and appropriately used.”

In simple words,  Lazy loading of Images means loading only those images that are visible to the user. So if your page have 4-20 images, then only the first few images will get loaded in the post. Rest of the images won’t get loaded until the user scrolls down. This will highly reduce your page load time. Many known website like Mashable use this technique.

To take benefit of this technique all you need to do is install and activate the plugin called Lazy Load and you are good to go. Clear cache of your browser and you will instantly notice the results of lazy loading.

Selectively load Plugins on a Web Page

Agree with me or not, most of the plugins installed on your WordPress site is largely irrelevant. I mean to say that you don’t need there functionality on every page of your Website but they still put a negative impact on your site’s load speed.

Wouldn’t it be great if you could have freedom to control over which plugins should be loaded on any given page or in what order they need to be loaded? Well, With Plugin Organizer, you can do that. Plugin Organizer provides you two important feature that can help you to reduce the total size of a page.

Change the loading order of the plugins :- With Plugin Organizer you can arrange the plugin in an loading order(High to Low priority). You can decide need to be loaded first as compare to other plugins during page rendering.

Disable or Enable plugins on select pages or post :- A highly useful feature, it allows you choose which plugin should be loaded on a selected post or page. The option to disable or Enable plugins on a selected page or post will be available below the WordPress text editor. You can also globally disable a plugin using Plugin Organizer > Global Plugins.

Prevent Hotlinking

Hot-linking is also known as bandwidth theft. This happens when another website link images on your site from their articles, which puts more pressure on your server. To learn how to prevent image hotlinking head over to this tutorial.

Prevent Image Hotlinking

Use of Content Delivery Network

A CDN is a high-performance network of servers across the globes that copies the static elements of your website and serve them to visitors from the closest POP. A CDN has their servers located throughout the world and because their servers will be located closer to your visitors most likely they will notice loading speed improvements . CDN is one of the most effective ways to drastically increase your Website loading speed.

Remove Query strings from Static Resources

if you right click on your Website and view its source code, you will notice some URL’s that look like this

http://Your_sitename.com/wp-content/plugins/js/some_js?ver=3.4.2

These URL’s mostly appears on CSS, JavaScript and Images. Basically these URL’s create two major issues.

  • it can give away your WordPress version, making it easy for an Hacker to plan an adequate attack according to your WordPress Version. Most probably this won’t be a problem as you must be updating your Website with latest release of WordPress. But if for some reasons you are running an older version of WordPress someone could use a known exploit for that version against you.
  • Most proxies do not cache resources with a “?” in their URL even if there is a Cache-control: public header present in the response. Removing queries from static resources such as Images, CSS and Javascript allows CDN to easily cache these static resources.

To  remove these query strings, copy and paste this code inside your functions.php file. Make sure to paste this code inside the PHP tag of your functions.php.

function _remove_script_version( $src ){

$parts = explode( ‘?’, $src );

return $parts[0];

}

add_filter( ‘script_loader_src’, ‘_remove_script_version’, 15, 1 );

add_filter( ‘style_loader_src’, ‘_remove_script_version’, 15, 1 );

Save the made changes and clear your Website Cache. After that Clear your browser Cache or Open a private tab in your browser( so that your browser won’t load content from the cache). Right click on your Website and view its source code, you will notice there will be no more query strings on your CSS and JavaScript URL’s.

Choose a good Web Host

Some people compromise quality service to save few bucks. Well, everybody have their own reason to do so but if you can pay those extra dollar then you should go for it. This will not only make sure that your 100% up-time but also gives you better customer service support.

Reduce the use of Plugins

There are millions of plugin available for WordPress platform that can save you from hard labour but using those plugins also slows down your page loading speed. Avoid using too many plugins. Try to keep them in between 10-20 for best performance.

To check which plugins are really adding the most to your website speed read this article

Find which plugins are slowing down your Website

Reduce the use of JavaScript

The other reason of slow page load time is using of too many JavaScript in the header. Try to put all those JavaScript in the footer before </body> tag by doing this those JavaScript won’t affect the initial page rendering and your website will load fast.

Split Comments

If you usually receive 15 or more comments then you should split them because they consume high amount of your server resources. You can do this in WordPress by going into Settings>Discussion in your admin panel and than break those comments according to your wish.

Browser Caching

Browser Caching allows you to set an expiry date or a age limit in the HTTP headers for static elements. This will automatically tell browsers to load static files like  css, images,  JavaScript etc, from local disks rather than downloading those files again .

To Set Browser Caching add this code in your .htaccess file on the top

ExpiresActive On
ExpiresByType text/html M3600
ExpiresByType text/css M3600
ExpiresByType application/x-javascript M3600
ExpiresByType image/bmp M3600
ExpiresByType image/gif M3600
ExpiresByType image/x-icon M3600
ExpiresByType image/jpeg M3600

Split Long Post

If you are planning to write a hell of a long post then you should split them in multiple pages. So, each page loads fast. This will also increase your page-views and it’s very easy to do if your theme supports it.

Just add this code when you want to split your page

<!–nextpage–>

Optimize your Website Code

Try to have a leaner and tidy coding design, this will improve content to code ratio and produce less pressure on your server. If possible opt for widely known Frameworks like  Genesis or Thesis which are known for their optimized code.

Optimize Images Displayed on Website

One of the most common mistakes that many inexperienced Webmasters do is that they don’t specify the Dimension of the images loading on the Website. Specifying height and Width for all images allows faster rendering by eliminating the need for unnecessary re-flows and repaints. Make sure to set dimension for all the images wherever possible.

Another sin of novice webmasters is to upload and serve an image far larger than what ‘s needed. Try to use images of lesser size and medium quality rather then serving large images directly by depending on WordPress’s image re-sizing functionality, this will surely improve your page loading time.

Always remain Up to Date

You should always stay updated with the latest WordPress version. This will not only increase your website security but also boost your website performance.

Is there anything you want to add this article? Share it with us in our comment section.