How to Speed Up WordPress Websites [COMPLETE GUIDE][2017 Edition]

How to Speed Up WordPress [COMPLETE Guide]
Is your WordPress website is slow? if yes, then you should start to optimize it.

If it’s loads faster, than shaving some extra milliseconds makes a great impact on your visitors and search engines.

Why WordPress loads slower?

WordPress is a great platform with clean and well code, but it’s not perfect. WordPress have a massive list of themes and plugins, but every plugin or themes are not good.

These bad things make your website sluggish and if it’s combined with crappy web host then its worst.

If you have question like, why is my WordPress site so slow? or how to increase speed of WordPress site? or How to Speed Up my WordPress Website?

Please read and carefully follow this guide.

In this post, I’ll share How to Speed Up WordPress Site Guide in the easiest way. If you have any problem with how to increase speed of WordPress blog guide, drop your question in a comments section.

Why speed necessary in the web world?

Google now consider site speed to decide your place in search results, if you still slow then ready to huge amount of visitors. Check this amazing infographic from Kissmetrics,

How loading time affects websites traffic and conversation

Infographic by Kissmetrics

How to Speed Up Your WordPress Site?

Before starting, please check your current website performance with Pingdom Tools and GTmetrix. Compare this result after applying tips from this guide.

I guarantee you this tip helps to boost your website speed.

#1. Choose a Good Webhost

You want to optimize your WordPress site for speed but how you improve a site where you’re web server make things sluggish and slower.

I Know, When you start as a newbie, you fascinated by Unlimited Pageviews or Bandwidth type web hosting advertise by pro blogger. As a newbie, it’s reasonable to buy this types of the host because they offer cheap plan affordable by any new blogger.

But this unlimited thing comes with costs, when you or another user who host on the same server, get traffic to your blog its load slower like a turtle. If blogs receive massive traffic then in many cases your website down or they send you to email about upgrading your site to a higher plan.

They cover their expenses with hosting thousands of website on the same server and all accessible through the same IP. Means, if any site flagged in search engines than its hurts your site SEO too. Check this article, The Truth About Unlimited Hosting.

Before purchasing web host, please go to google and search for a review. Check communities like WebHostingTalk and please don’t trap yourself in Unlimited Hostings Plan. Check this article, Beware of “Web Hosting Review” and “Top 10 Web Hosts” Sites

I divide WordPress Hosting in three different categories.

a. Affordable WordPress Hosting:

If you are looking for affordable WordPress optimize hosting, check SiteGround.

They Offer managed WordPress hosting with latest features like PHP7, HTTP/2, SSD, Free SSL Certificates and tons of other features starting from 3.95$ / Month.

SiteGround have similar features as compare to WPEngine in affordable price range.

But, if you still want to use unlimited type WordPress hosting, choose BlueHost. If you are from India and want to buy hosting from BlueHost, choose US Hosting. Don’t buy Indian BlueHost hosting account.

b. Premium WordPress Hosting:

Not Every business is same, that’s why some business or high traffic getting website need premium WordPress hosting. Choose WPEngine for your big projects.

Their plan starts from 29$ / Month, and they are a leader in WordPress Managed Hosting.

c. Geeky [DIY] WordPress Hosting:

If you are a tech-savvy blogger or want more power as compare to shared hosting environment with total control on your server.

Choose any Virtual Private Server provider.

In this type of web hosting, everything managed by yourself or operated by a provider with extra cost.
If you go with this, then choose unmanaged VPS from Subnet Labs[currently host this blog] or Digital Oceans.

But, Masood, How can I manage it myself?

Don’t worry, with the help of EasyEngine; you can set up the world class WordPress optimized environment in minutes.

#2. Use Solid WordPress Theme/Framework

Themes play a major role in WordPress because either it attracts your visitor or distracts them. That’s why you see many themes in WordPress ecosystem. As a new blogger, everyone attracts to free WordPress themes or some shiny premium WordPress theme which has endless post display setting and blah blah blah.

Many free themes add lots of unnecessary code on your WordPress site, or they won’t follow WordPress themes guide. The result, your website loads slower due to many calls to your server or database. This condition is also applied to many premium themes. For more sells, they add lots of function in one theme which is not required by your website, and these features make your site loads slower.

Default WordPress themes are always speedy and well coded and easy to customized, but I advise you to buy some premium themes or hire a coder.

This blog use Authority Theme from MyThemeShop, its optimized by six figure blogger Mathew Woodward. Check my review here, Authority Theme Review: Make Your Money Blog Now.

Authority Theme Responsive Test across devices

If you want clean and light weight theme then choose Genesis Framework, or for making fancy website without compromising your speed then choose Elegant Themes. Both theme provider provides wide range of themes which fits in any niche.

#3. Install Good Caching Plugin

The second most important part in this guide after choosing a good web host is installing a good caching plugin. After installing any active caching plugin your website, you can tell the difference between a page with caching or without caching plugin.

Caching plugins make a copy of your site in a separate folder in entirely static form or try to reduce calls to your blog server, and when a user arrives at your site then instead of showing original page plugin show them a cache version of a page. It reduces database calls, no of PHP requests and no of HTTP requests(combining many files into one).

WPRocket is my favorite caching plugin and use it on all my blogs. Before using WPRocket I use W3 Total Cache with memcached enabled and my website load in 300ms, yes 300ms but after WPRocket its loads under 200ms with same page size(page size: 299KB).

ATHEMES compares 9 popular WordPress caching plugin and find WPRocket faster than W3 Total Cache or WP Super Cache.

Check WP Super Cache or Simple Cache, both are great plugin and newbie freindly.

#4. Use a Content Delivery Network(CDN)

CDN used for offloading your static resources from your main server, like CSS, Javascript, Images, and Files. This offloading process makes your website loading faster at the user end and your primary server free from this task.

How CDN Works?

CDN providers cache your static contents in their datacenters, across all over the globe. When user requests this resources than its loads from datacenter which is closer to user location.

If your server host in New York and a visitor comes from India, then CDN provider loads static files from the Asian data center.

There are many CDN providers available in web market, but KeyCDN is most affordable CDN provider. KeyCDN provides free SSL and HTTP2 support. Check this post from Woorkup, KeyCDN Review – The Best MaxCDN Alternative for Bloggers.

If you are new blogger and you are unable to bear the cost of these premium CDN’s then choose CloudFlare, it’s acts as a CDN and also provide security for your blog. Like, block bad bots and visitors to accessing your site and makes your site faster.

#5. Enable Gzip Compression

Enable Gzip
Always served gzip version of website to your visitor, beacuse its compress your overall webpage size and makes it faster.

Check Gzip Compression of your site with this tool.

If you host your website with cpanel, enable gzip from panel or you can use plugin like Check and Enable GZIP compression, W3 Total Cache, WP Super Cache or WPRocket.

Gzip also enable via .htaccess, for Apache

## BEGIN : Enable GZIP Compression (compress text, html, javascript, css, xml and so on) ##

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
AddOutputFilterByType DEFLATE application/x-httpd-php
AddOutputFilterByType DEFLATE application/x-httpd-fastphp
AddOutputFilterByType DEFLATE image/svg+xml
SetOutputFilter DEFLATE

## END : Enable GZIP Compression ##

For Nginx,

gzip on;
gzip_comp_level 2;
gzip_http_version 1.0;
gzip_proxied any;
gzip_min_length 1100;
gzip_buffers 16 8k;
gzip_types text/plain text/html text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript;

# Disable for IE < 6 because there are some known problems
gzip_disable "MSIE [1-6].(?!.*SV1)";

# Add a vary header for downstream proxies to avoid sending cached gzipped files to IE6
gzip_vary on;
Please take a full backup of your website before playing with .htaccess file.

#6. Add an Expires header

When someone visits your site, visitor browser downloads all files from your server to visitor device and render your website. Expires header set a expire time for your static content.

Mean If you enable expire header for static resources then at the second visit of the same visitor, browser, not downloads same content and display resources from the first visit if it does not expire.

Add these code in .htacess to enable expire header in WordPress.

<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access 1 month"
ExpiresByType image/jpeg "access 1 month"
ExpiresByType image/gif "access 1 month"
ExpiresByType image/png "access 1 month"
ExpiresByType text/css "access 14 days"
ExpiresByType application/pdf "access 1 month"
ExpiresByType text/x-javascript "access 14 days"
ExpiresByType application/x-shockwave-flash "access 1 month"
ExpiresByType image/x-icon "access 1 year"
ExpiresDefault "access 14 days"

Above numbers are changable, change accrding your needs.

#7. Use a Minified Resourses

Web sites use CSS and JS files to beautify, and these files are many in quantity. Every plugin or themes you add in your blog add some CSS or JS files.

If browsers communicate with your websites with HTTP v1 Protocol, then they download only four files in a parallel manner. Imagine, your blog has 20+ CSS and JS files. How much time browsers spent to connect your hosts and fetch them to display your website to Visitor?

For this problem, you can use plugins like Autoptimize or WPRocket. They minify and combine your static resources in one or two file, then sends these files to visitor. These helps to speed up overall process.

#8. Optimize Your Images

Images are heaviest and necessary elements of any web page; It increases engagement on your page. Due to heavy in storage, its loads your website slower, and sometimes your site still loading and visitor leaves your site. For this, we have some easy solution.

A picture is worth a thousand words.

First, you must specify image dimension thumbnail, medium, and large sized images. I always choose a medium and large size up to 2000 * 2000. Why?

Every theme comes with own image size and that time medium, and large setting creates an image which is not used by posts. Then simply make it higher than your possible image size.

Second, reduce your uploaded image size, don’t worry we have two great free plugin for this work.

  1. Imagify
  2. ShortPixel

I test both plugins on my personal website, where both compress 7mb image folder in 3.5mb. Imagify perfect for JPG while ShortPixel great for PNG. Both are free for some quotas and newbie it’s sufficient. Install WordPress plugin for any of plugin and start compressing your image without leaving your WordPress dashboard.

#9. Lazy Load your Images

Lazy Load helps you to save bandwidth and speed up your WordPress site. How?

Lazy Load displays images, videos or iframes to a visitor when it’s visible. With the help of lazy load, you can reduce HTTP requests to your server; you save your resources by not showing images to a visitor who not read your article or not scroll down.

You can use WPRocket or Rocket Lazy Load or a3 Lazy Load to add lazy loading fuctionality in your blogs.

#10: Optimize Your Database

You can optimize your database through plugin or by PHPMyAdmin, plugin like WP Sweep or WP Optimize. WP Sweep is better than WP Optimize according to my experience.

These plugins delete pending spam comment(if you use default WordPress Comments), Post revision, Post draft and many things. WordPress works with database and optimizing database gives your website huge boost in WP speed up process.

Please backup your website or publish your saved draft before making total cleanup, because it not reversible in many cases.

#11. Only Install Well Coded Plugin

In WordPress plugin directory, you can find thousands of plugin and after analyzing their code, you find many plugins are not well coded, and some won’t follow the standard. Always install a plugin which updates time to time.

There is one problem, How you could find a better plugin for the same job.

How to find Well Coded Plugin

First check plugin rating, if it’s below three stars then try to find an alternative. But some plugin won’t get any star and still update with WordPress version, check those plugin on localhost or in a sandbox. Why you won’t install a poorly coded plugin? Because they insert lots of inappropriate hooks in your website, and it’s slow down your site.

Second, after installing your desired plugin, check performance and impact of plugin on your website using P3 Profiler. It’s not 100% accurate but still you find a problem on your website.

#12: Perform Routine Maintenance on Your Site

WordPress plugins are an easy target for hackers. Why?

Update WordPress Plugins and Themes

Many times we are not paying attention to our blog and not update it time to time, when you check the internet you find main reason for hacked WordPress website is not update plugins.

Always uninstall and delete plugins which are not required, because it’s slow down your site by calling not required resources.

#13: Optimize your homepage to load quickly

Always optimize your blog front page, change default settings of your theme. Don’t display too many posts or infinite scrolling pagination.

Keep this point in your mind while optimizing your front page,

  1. Display summery instead of full post
  2. Reduce the amount of post in front page(Mine is 4-5)
  3. Remove sharing widgets from front page
  4. Remove unnecessary widgets from your front page
  5. Don’t display too much ads, or won’t display it
  6. keep it simple

#14: Limit and Delete Old Post Revisions

Do you require 10s of posts revision for your published posts? I think it’s not necessary.

You can use WP-Sweep or Revision Control to delete posts revisions from your WordPress database and make it smaller and faster.

But, sometimes while writing posts we need some revision if things goes wrong, add this code in your wp-config.php before /** Absolute path to the WordPress directory. */,

define('AUTOSAVE_INTERVAL', 600);
define('WP_POST_REVISIONS', 3);

You can change auto post time 600 to your desired time, time in seconds and change post revision 3 to whatever you want but keep it below 5. Otherwise no meaning for this code.

#15: Turn off pingbacks and trackbacks

WordPress uses pingbacks and trackbacks for interacting other WordPress blogs.

When someone mentions your blog or site in their posts, its notify your website and most time this is use for getting a backlink. This could hurt your backlink profiles and also its makes loads on your blog database.

Turn off Allow link notifications from other blogs (pingbacks and trackbacks) on new articles in your Discussion Setting.
WordPress pingbacks and trackbacks Setting

If you turn off this setting, it does not destroy your profile and also helps to save database from junks. Check How to Deal with Trackbacks and Pingbacks in WordPress for further explanations.

#16: Reduce and Delete Spam Comments

Comments are an essential part for any posts, comments promote and give freedom of speech to visitor and readers of blog posts. Comments help you in SEO when Google see engagement on the page, then its consider as a vote of trust.

WordPress Comments Spam Problem and Plugins Solutions

But, some people use comments for spamming or link back to their website. Link back to commentator site encourage a visitor to leave a comment on your posts but again we deal with lots of comments linking to spam sites.

You can activate Akismet plugin, it helps us to catch spam comments, but all spam comments go into spam queue and make database size larger.

I use WordPress Zero Spam, Its never show any spam comments in spam queue. You sould use Zero Spam, its also protect your contact forms.

#17: Use Google CDN for Jquery

Almost every WordPress theme calls Jquery to animate things and its loads from your server when a visitor comes to your website. Jquery file load from a server and its waste your 33KB bandwidth every time. Why?

Because Google host latest Jquery on their servers and your server never beat Google. If you use Google Jquery library, then it’s a chance this file already download on your visitor computer. If it’s present in visitor computer, then browser calls this file from the cache and not download it again. It saves bandwidth and time.

You can add this via Falcon Plugin or via function.php file,

add_action( 'wp_enqueue_scripts', 'register_jquery' );
function register_jquery() {
wp_deregister_script( 'jquery' );
wp_register_script( 'jquery', ( '' ), false, null, true );
wp_enqueue_script( 'jquery' );
Replace with in line no 4.

#18: Remove Google Web Font

Typography helps in reading and make blog beautiful. It makes a blog more appealing to a visitor. That’s why every theme developer adds in themes.

These fonts add 10 to 50KB extra weight in your CSS and also add 3 to 6 HTTP requests in your blog.

The visitor wants clean and fast loading blog with full of information; you can use Georgia, Thoma or Verdana font in your blog.

Use Remove Google Fonts References to remove Google fonts from your themes.

#19: Replace PHP with static HTML, When necessary

WordPress wrote in PHP language; it makes your site efficient, and you are free from entering the same information multiple times. But, calling resources using PHP increases server load. You should replace PHP content on your theme with HTML if it’s possible. Its increases your blog speed.

Please backup your blog before doing this steps.

For example, in many themes, functions like these are executed for each page load:

<title><?php bloginfo('name'); ?> - <?php bloginfo('description');?></title>
<link rel="shorcut icon" type="image/x-ico" href="<?php bloginfo('template_url'); ?>/favicon.jpg" />
<link rel="stylesheet" type="text/css" media="screen" href="<?php bloginfo('stylesheet_url'); ?>"/>
<link rel="stylesheet" type="text/css" media="print" href="<?php bloginfo('template_url'); ?>/print.css" />
<link rel="alternate" type="application/rss+xml" title="RSS" href="<?php bloginfo('rss_url'); ?>" />

And when you replace the PHP functions with simple HTML, it looks like this:

<title>BlogGyaani - Your Ultimate Guide to Blogging Success</title>
<link rel="shorcut icon" type="image/x-ico" href="" />
<link rel="stylesheet" type="text/css" media="screen" href=""/>
<link rel="stylesheet" type="text/css" media="print" href="" />
<link rel="alternate" type="application/rss+xml" title="RSS" href="" />

#20: Disable hotlinking of images

When someone hotlink your blog image, its make your website load slower. To prevent your bandwidth stolen from your website, add this code in your .htaccess file or use this website to create custom .htaccess for your need.

## Disable hotlinking of images with forbidden or custom image option ##
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)? [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)? [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)? [NC]
RewriteRule \.(jpg|jpeg|png|gif)$ – [NC,F,L]

#21: Host your videos externally

If you are a video blogger, then this is for you.

Videos require lots of bandwidths to serve and for different devices you need a different size for video, and this is costing you lots of bandwidth and storage space.

Use Youtube or Vimeo for hosting your videos.

They serve videos according to visitor device size and also offer in low and high resolution.


Site Speed Importance in Search Engines Eyes

Site speed is now the important factor in search engine positioning algorithm. You can lose your potential visitor due to the slow speed of a website. Internet users close site if it’s not loaded in three seconds and shift from desktop to the internet enabled devices means if you are not fast then you’re not going to seen.

This post helps you to speed up your WordPress blog or website, and I test all these tips on various sites.

Check BlogGyaani speed on Pingdom Tools,
BlogGyaani Speed Test Result

I think after reading and applying techniques at your site, you can make your WordPress website faster, aren’t you?

What other ways do you recommend to speed up WordPress sites and improve load times of WordPress websites?

This blog post updates immediately after I find any new ways to Speed UP WordPress Sites.

Thanks for reading! Please share this article if you enjoyed it.

Full Disclosure: This post may contain affiliate links, meaning that if you click on one of the links and purchase an item, we may receive a commission (at no additional cost to you). All opinions are our own and we do not accept payments for positive reviews.