How To Speed Up WordPress Load Times?

How To Speed Up WordPress Load Times

Many Bloggers and Developers are still searching for a way to speed up WordPress load times because it’s one of the factors that also affect SEO.

If your web page load time is slow then visitors often leave your blog as soon as possible.

Last time I have written an article for WordPress users to improve website performance 10 times faster than ever using W3 Total Cache and Cloudflare after testing on my Blog.

I’ll admit it:

I’m addicted to speed.

No, not the psychostimulant;

I’m talking about website speed.

I’m not alone, either.

Google Last time announced that they consider website speed when determining search engine rankings.

Oh, did I mention that a slow website can literally kill your revenue stream?

Check out what the experts at have to say about the topic:

Google found that moving from a 10-result page loading in 0.4 seconds to a 30-result page loading in 0.9 seconds decreased traffic and ad revenues by 20% (Linden 2006).

When the home page of Google Maps was reduced from 100KB to 70-80KB, traffic went up 10% in the first week, and an additional 25% in the following three weeks (Farber 2006).

Tests at Amazon revealed similar results:

Every 100 ms increase in load time of decreased sales by 1%. (Kohavi and Longbotham 2007). ( Source )

It’s quite clear.

Everyone hates slow websites.

The question is, how can you make your WordPress website faster?

Keep reading and I’ll show you how you can take proactive steps towards speeding up your site.

What Determines Website Page Speed?

The Yahoo! YSlow and Google Page Speed Mozilla Firefox plugins evaluate your site against the widely accepted rules of website performance.

The problem is, they don’t tell you what to do with the information they provide.

So, I’ll break down the top performance recommendations and show you-you can apply them to your website.

Let’s do it…

  • Minimize the number of HTTP requests
  • Optimize and correctly display images
  • Minify HTML, CSS, and Javascript
  • Use a Content Delivery Network
  • Gzip and compress components
  • Choose over @import
  • Put stylesheets at the top
  • Put scripts at the bottom
  • Utilize browser caching
  • Use CSS Sprites

Minimize the number of HTTP requests

Translation: Limit the number of files required to display your website.

When someone visits your website,

The corresponding files must be sent to that person’s browser.

This includes CSS files, Javascript library references, and images.

As expected, every file you use to enhance your design detracts from its performance.

Similarly, WordPress plugins are notorious for injecting extraneous CSS code in the head of your site without giving you the option to manually add the required styles to your stylesheet.

The key takeaway is this: eliminate everything that’s unnecessary.

If you’re using a plugin because you like, take a look at how it impacts your code.

The extra page-load time may not be worth it.

Optimize and correctly display images

Translation: Make images as small as possible and don’t require the browser to resize them

Depending on the format, many images contain a ton of extraneous metadata that can drastically increase the size of the file.

Many designers fail to compress their images before uploading them to the web, and the overall impact of this can be dramatic with image-intensive designs.

Another cardinal sin of inexperienced webmasters is to upload and serve an image far larger than what is required for the design.

WordPress is an unfortunate enabler of this, as many novice website owners upload large images directly off of their digital cameras and utilize WordPress’s image resizing functionality to display a smaller version.

With free applications like Picnik and Image Optimizer at our disposal,

There is simply no excuse not to resize and optimize!

Visitors (and your server) will thank you.

Minify HTML, CSS, and Javascript

Translation: Remove all white space from code when possible before serving it to visitors

The spaces, tabs, and orderly structure used in the code is to make it more human-readable.

Servers and browsers don’t care about what the code looks like as long as it’s valid and executes without error.

If you want your files to download faster, you can remove this whitespace before serving your code.

Since it would be impractical to remove white space from files that are constantly edited (unlike Javascript libraries like jQuery, which are almost always served minified),

We’ll want to leverage a plugin like WP-Minify (good) or W3 Total Cache (best) to handle this at runtime without affecting the files we need to edit.

Whitespace is great for web design but in our code?

Not so much.

Use a Content Delivery Network (CDN)

Translation: Use a CDN to lighten the load on your server and turbocharge its performance

A CDN is a high-performance network of servers across the globe that replicate the static assets of your website and serve them to visitors from the closest POP.


I know, I know.

The good news is that we don’t have to understand the mechanics behind Content Delivery Networks in order to understand their power:

You have a team of servers distributing your static assets to visitors across the globe.

I’ve written a post on making WordPress faster by integrating a CDN if you’re interested in further reading on the topic.

CDNs are among the most effective ways to absolutely turbocharge the speed of our sites.

We can’t neglect the other areas of optimization in the process,

So, this should be treated as the crowning jewel atop your beautifully optimized website.

Gzip and compress components

Translation: Compress files at the server level before sending them to browsers

If you were instructed to hurl a piece of paper across the room as far as it can go,

Would you lightly crumple it or squeeze it with all your might?

That’s right,

You’d get your Hulk Smash on.

The sample principle applies here:

We want to allow our webserver to compress our files before sending them to visitors.

We can drop a few lines of code in our .htaccess file to accomplish this:

#Begin gzip and deflate
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/css application/x-javascript text/plain text/xml image/x-icon

This code might look a bit intimidating, but it’s actually pretty simple.

We’re just checking to see if the Apache mod_deflate module exists.

And if so, electing to serve HTML, CSS, Javascript, plain text, and favicon files using gzip compression.

Note that this requires the Apache web server and the mod_deflate module.

To enable gzip compression with NGINX,

Ensure that the following lines exist inside of the appropriate directive:

server {
gzip on;
gzip_types text/html text/css application/x-javascript text/plain text/xml image/x-icon;


Choose <link> over @import

Translation: Beware the suck of IE!

When including your stylesheets,

Always link to the files instead of using the @import reference.

IE handles them differently by loading them as if the reference was at the bottom of the document.

Nice work, Microsoft!

Put stylesheets at the top

Translation: All interface-related stylesheet references should be included in the of your document

We never, ever, ever want to display unstyled content to visitors,

Not even for a split second.

Files responsible for the appearance of our site should be loaded first so they can be applied to the HTML as it loads.

Makes sense,


Nothing more to it.

Put scripts at the bottom

Translation: All functionality-related files can be loaded after our content is loaded

As we think through how to deliver our content to visitors as fast as possible and the subsequent steps that users will take.

We will use the following priorities:

  • Get content to visitors as fast as possible
  • Don’t allow unstyled content to appear in the browser (put CSS in the <head>)
  • Load the files required for interaction (tabbed widgets, certain external API calls, etc.) last

The thinking behind this is simple: users aren’t going to interact with the content before they can see it!

Utilize browser caching

Urban Translation: Where the cache at?

Standard Translation: Don’t require browsers to pull down another copy of static files every time

With browser caching,

We’re explicitly instructing browsers to hang onto particular files for a specified period of time.

When the file is needed again, the browser is to pull from its local cache instead of requesting it from the server again.

Running a website without caching in place makes as much sense as driving to the store for a glass of water every time you’re thirsty.

Not only is in impractical and short-sighted, but it also takes more work!

The ExpiresByType directive is used to tell browsers which files to cache and how long to hang onto them.

The example below would tell our visitors’ browsers to hang onto HTML, CSS, Javascript, and images, and favicon for an hour (3600 seconds):

<IfModule mod_expires.c>
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

Again, the code above is for your .htaccess file on an Apache server.

The corresponding settings in NGINX would look something like this:

location ~* \.(jpg|png|gif|jpeg|css|js)$ {
expires 1h;


Use CSS Sprites

Translation: Serve one highly optimized image for your design to minimize the performance impact

A CSS sprite is an image comprised of other images used by your design as something of a map containing the coordinates of all the images.

Some clever CSS is used to show the proper section of the sprite when your design is loaded.

There are fantastic articles on the topic available across the web that dive into the mechanics of CSS sprites and wonderful resources for creating them.

SpriteMe is a utility that generates the sprite and code required to make it work.

If you inspect the code for the nav menu on,

You’ll see a great example of how to implement a CSS sprite.

Whew! Still reading?

If so, great! You’re well on your way to a much faster website.

If you implement even a handful of the techniques outlined in this post,

You will see an immediate and dramatic improvement in your site’s performance.

It’s not important that we know how everything works from database calls to HTTP requests.

I surely don’t.

it’s important that we’re familiar enough with the concepts to work towards them on our sites.

Work smarter, not harder

You could spend a few months learning the ins and outs of web server architecture,

  • How different browsers implement caching, and
  • How to tie it all together…

Or you could simply install and configure the W3 Total Cache plugin by Frederick Townes (CTO of Mashable).

I can give no higher recommendation for a performance-related plugin than this one.

The features could easily fill another post,

But, I’ll give you the important part:

W3TC helps you thoroughly address 80% of the recommendations outlined in this post.

There are other solid options for caching plugins,

But W3TC stands head and shoulders above the rest.

Handy resources

In your quest for website speed, you might find these resources helpful:

  • Pingdom—test how fast your site is before and after making changes
  • WordPress Caching—an in-depth comparison of WordPress caching plugins
  • Working backward—Mashable CTO Frederick Townes delivers the keynote at WordCamp Denmark
  • Screaming Fast WPMU—Dan Collis-Puro shows how Harvard dramatically increased the performance of their websites

I hope this article helped you,

Now please do share this article with your friends to help them and spread articles to Worldwide.

Do comment, If you have queries and Suggestions.

Written by Vishal Rana

Founder and Editor-in-Chief of 'PresentBlogging'. Grey Hat Hacker, Cyber Security Consultant, Information Security Researcher, Programmer, Developer, Social Engineer, Penetration Tester, Professional Blogger and SEO expert.


Leave a Reply

Your email address will not be published. Required fields are marked *





How to Add Amazon Affiliate Links on WordPress Blog

How to Add Amazon Affiliate Links on WordPress Blog?

How To Speed Up WordPress Sites Performance

How To Speed Up WordPress Sites Performance?