How to Speed up WordPress: A Detailed, Actionable Guide

How to Speed up WordPress: A Detailed, Actionable Guide

Want to speed up WordPress?

Your WordPress site’s page load times have a huge effect on your site. Slow load times increase your bounce rates, decrease your conversion rates, and just generally lead to poor user experience. 

What’s more, Google uses page speed as an SEO ranking factor, so a slow WordPress site could be hurting your marketing efforts, too.

For that reason, taking the time to speed up your WordPress site is one of the best investments you can make.

Yes — it will take some effort. 

But the return on investment (ROI) on that time will pay dividends when it comes to the success of your website.

In this post, we’re here to help with an actionable step-by-step guide to how to speed up your WordPress website. 

We’re going to focus on the proven, big-ticket changes that will make a meaningful impact on your site’s page load times.

Pick a Lightweight WordPress Theme as Your Foundation

All the steps in our tutorial will help you speed up WordPress. But before you implement them, it’s important to make sure that you have the right foundation.

On a WordPress site, that’s your theme. Your theme will play a huge role in your site’s page load times, so it’s important to choose a fast-loading theme that will set you up for success once you follow the steps in our tutorial.

We’ve built our Astra theme to provide a lightweight foundation upon which you can build any type of site. 

Astra clocks in at under 50 KB in file size and has no jQuery dependencies, which means it won’t get in the way of your page load times.

The difference can be large. For example, here are the page load times for the default “Hello World!” post on Astra and another popular theme (NewsMag):

  • Astra: 1.1 seconds
  • NewsMag: 1.6 seconds

Astra:

Astra Website Speed Test

NewsMag:

NewsMag speedtest results

Not only does Astra load more than 30% faster, it also has a much smaller footprint.

But at the same time, Astra doesn’t skimp on features. You’ll still get:

  • 50+ importable demo sites for a range of niches
  • Detailed customization options in the user-friendly WordPress Customizer
  • WooCommerce support
  • Integrations with popular page builder plugins, like Elementor and Beaver Builder.

If you want to use a different theme, you can set up a sandbox environment and run a waterfall analysis to see how optimized the theme is.

How to Accurately Measure Your WordPress Site’s Speed?

In order to accurately diagnose how big of a problem you’re facing, you need to understand your site’s current page load times.

To do that, we recommend GTmetrix.

All you do is enter your site’s URL and the tool will spit back details for how long your site takes to load. 

GTmetrix Categories

Don’t focus too much on abstract scores that some tools give you. While those scores can be helpful for diagnosing issues, the only thing that really matters is your site’s actual page load times.

What Is “Load Time”, Anyway?

When people talk about a WordPress website’s “load time”, they often present it as a singular number. That is, if your page speed test tool says your website loads in 2 seconds, every visitor will experience 2 second page load times.

But there’s a big problem with that: That’s not at all how the real world works.

In the real world, people are going to be visiting your site:

  • From different devices, like a top-of-the-line Macbook Pro vs a budget Android smartphone. 
  • With different connection speeds, like a blazing fast wired connection vs 3G.
  • From different locations, like Los Angeles vs Singapore.

If someone is using a budget Android phone on a slow 3G connection, they’re going to perceive your site as loading slower than someone using a brand new Macbook Pro and a super-fast wired connection. Part of this is just the connection speed, but there are also other differences, like the fact that a budget Android phone will take a lot longer to parse your site’s JavaScript than a high-powered Macbook pro.

Beyond all those differences, there’s also a whole other issue of when a page is considered “finished loading”. Is it when a human can see the page? Is it when all the background tracking scripts finish loading?

GTmetrix has a really good post that explains those differences and how they can affect the page load time you see.

What Is a “Fast” Page Load Time?

We’ve talked about making your WordPress site faster. But what does it mean to actually be “fast”?

That is, what page load time should you be aiming for?

There’s no hard number here, but most of the data says that you want to be under 3 seconds at max:

  • Google — recommends under 3 seconds on mobile.
  • Pingdom — “As soon as the page load time surpasses 3 seconds, the bounce rate soars”.
  • Section.io — found a steady increase in bounce rate and decrease in pages per visit as page load times go up.

Of course, under 2 seconds is even better.

And remember — you want your site to load in under 3 seconds in the real world, not just in a clean, unthrottled test environment.

How to Speed up WordPress In 7 Steps

Ok, now that you know how your website is loading for real people in the real world, it’s time to speed it up.

Below, we’ll cover 7 steps that will make a meaningful impact on your site’s load times:

  1. Use performant WordPress hosting
  2. Perform a waterfall analysis and optimize scripts
  3. Optimize images
  4. Implement page caching
  5. Use a CDN
  6. Use performant DNS
  7. Pick optimized WordPress plugins

Step 1: Use High-Performance WordPress Hosting

All the other steps on this list can help you get a faster WordPress site, but your hosting is still one of the most important factors for making your website load fast, which is why it’s step #1.

That is, if your host is slow, no amount of performance optimization is going to get you a fast-loading site.

If you’re on a budget, you’re probably looking at shared hosting. With shared hosting, you “share” your server’s resources with other accounts. Done well, your site can still load fast.

If you’re willing to spend more in the $30+ per month range, you can also get dedicated resources in the form of a virtual private server (VPS) or dedicated server. With these setups, your server’s resources are 100% dedicated to just your site(s).

For most WordPress users, especially smaller sites, we recommend starting with high-quality shared hosting. You can always upgrade to dedicated resources later on as your site grows.

So — what should you look for in a WordPress host when it comes to performance?

  • PHP 7.X+ — recent versions of PHP are more secure and much faster. In Kinsta’s PHP benchmarks, PHP 7.3 is able to process almost 3x as many requests per second as PHP 5.6. Additionally, older versions of PHP no longer receive support.
  • Good data center locations — the physical location of your site’s servers will affect your site’s page load times. You want to be able to choose a data center that’s as close as possible to the bulk of your site’s audience.
  • Resource allocation — if you’re using affordable shared hosting, you want to make sure your host doesn’t have a reputation for overloading those shared servers to save money.

Of course, you’ll also want to consider other factors beyond performance, like a host’s uptime, support, and security features.

While there are a number of quality WordPress hosts that check those boxes, we recommend SiteGround for most people because it has the best balance of price, performance, and quality:

Managed WordPress hosting

Plans start for as little as $3.95 for your first billing cycle.

SiteGround also has a dedicated SiteGround Migrator plugin that makes it super easy to migrate unlimited sites to SiteGround.

Step 2: Perform a Waterfall Analysis of HTTP Requests

Once you have high-performance hosting, it’s time to get a little more technical.

If this step feels overwhelming, you don’t have to do this. While you might not have a 100% optimized site without digging into the technical details, you can still have a 90% optimized site, which is fine for most situations.

If you’re up for some DIY, though, I’d highly recommend doing a little analysis of what’s happening under-the-hood when your site loads.

What Is A Waterfall Analysis?

A waterfall analysis shows every single HTTP request on your website.

Whenever someone visits your website, their browser needs to “request” all of the resources it needs to load that page. 

Some examples:

  • Each unique image is one HTTP request.
  • Every CSS file is one HTTP request.
  • Every script is one HTTP request (including external scripts, like Google Analytics).

Each request takes a different length of time. For example, one HTTP request for an image might take 500 ms, while loading a small script only takes 50 ms.

Additionally, these requests are loaded in a different order. A visitor’s browser basically reads your site’s code from top-to-bottom and requests assets as it encounters them.

Performing a waterfall analysis will tell you:

  • How many HTTP requests a page requires?
  • In what order these HTTP requests occur.
  • How long each HTTP request takes to load?

Here’s an example of what it looks like:

GTmetrix Waterfall

How to Use the Waterfall Analysis?

To run a waterfall analysis, we recommend the GTmetrix tool from earlier because it has a really nice waterfall analysis interface.

Enter the page that you want to analyze in GTmetrix. Then, click on the Waterfall tab when the results load.

Next question — how do you use the waterfall analysis?

Well, if you want the long and detailed version, you can give this video a watch:

But here’s the condensed version…

First off, each row in the table is a unique request — you can see that this page has 63 total requests if you look at the bottom of the table:

GTmetrix Waterfall

To see where a request is coming from, you need to hover over the URL column. 

You’ll then need to “read” the URL, which is usually pretty clear about where the asset comes from. For example, the script that I’m highlighting comes from Elementor — “…wp-content/plugins/elementor/…

Next, you want to look at the Timeline column to see how long each request takes to load. Pay special attention to the requests that take the longest to load because those have the biggest effect on your page load times.

For example, you can see that this single unoptimized image took a whopping 2.24 seconds to load:

Waterfall Chart Timeline

Yikes! That’s why optimizing your images is so important.

Once you take the time to go through all the requests, you should have a much more accurate understanding of what’s slowing down your site and where the bottlenecks are.

Now — it’s time to fix it.

Remove Unnecessary, Slow-Loading Plugins

First off, if you find plugins that are loading slowly that aren’t necessary to the functioning of your site, you should think long and hard about whether you really need to include that plugin.

If your site can do without it, you should just remove it and get rid of those slow requests entirely.

Step 3: Optimize Your WordPress Images

According to the HTTP Archive, images account for about 50% of the average website’s page size.

Because your images are likely such a large part of your page size, finding ways to shrink their file sizes offers a huge ROI when it comes to speeding up your WordPress site.

Many WordPress users will upload images without thinking, which can lead to huge 3 MB+, 3,000px images. That means your site is loading larger files than it needs to, which will slow down your site’s load times.

There are two main parts to optimizing your images:

First, you need to resize your image dimensions

Most WordPress themes have a content area that’s under 1,000px wide. To account for Retina screens, you’ll typically want to upload an image that’s double that width (or whatever your theme’s width is).

But even accounting for Retina images, if you upload a 3,000px wide image, you’re not getting any benefit in terms of quality because your theme is just going to scale it down anyway. Basically, you’re adding file size for no benefit.

To fix this, you can automatically resize your images to certain max dimensions based on your theme.

Second, there’s image compression

Image compression further shrinks the file size of your images without changing the dimensions. There are two types of compression:

  • Lossy — a large reduction in file size but also some decrease in image quality.
  • Lossless — a comparatively small reduction in file size, but no loss in image quality.

If you’re a photographer or in another niche where image quality is paramount, you’ll probably want to stick with lossless compression. Otherwise, most sites will be fine with lossy, as most users won’t notice a difference.

Two Great Plugins to Automatically Optimize Images on WordPress

To automatically optimize your images, we recommend using one of the following two plugins:

In addition to automatically resizing and compressing your images as soon as you upload them, these tools also go further and:

  • Dynamically serve properly-sized images based on a visitor’s device. For example, someone browsing on a smartphone gets a lower-resolution image than someone browsing on a laptop with a Retina screen.
  • Serve your images from a global content delivery network (CDN). This speeds up your global page load times (more on CDNs later). Optimole uses Amazon CloudFront, while ShortPixel doesn’t publish what infrastructure it uses.
  • Lazy load your images. This speeds up perceived load times by waiting to load below-the-fold images until a user starts scrolling down. “Below the fold” images are images that aren’t immediately visible when a user lands on a page. That is, a user needs to scroll down to see them.

How to Set up Optimole?

Both plugins are great, but we’re going to use Optimole for this tutorial because the way its free plan works should be more affordable for most WordPress sites. 

Optimole’s free plan lets you optimize unlimited images for 5,000 visitors per month. That is, even if a visitor views multiple pages, it still only counts as one visit.

To get started:

  1. Install and activate the free Optimole plugin.
  2. Follow the plugin’s prompt to register for an API key.
Optimole setting screen

Optimole will then send you an email with your API key:

  • Copy the API key from the email and paste it into the API Key field in your WordPress dashboard.
  • Click Connect to OptiMole Service
Connect to Optimole service

You should see a success message letting you know that your site is connected. 

Optimole will now start automatically optimizing both your new and old images and delivering them via its built-in CDN.

If you want to change the compression level or other settings, go to the Settings tab and then click on Advanced:

general Settings Optimole

And that’s it! Your images are now optimized.

Step 4: Implement Page Caching (If Your Host Doesn’t Already Do It)

In order to understand what page caching is, we first need to talk about what happens when someone visits your WordPress site.

When someone visits your site, your server needs to deliver the HTML for your website to that person’s browser so that their browser can render your website.

But by default, your server doesn’t just have this HTML laying around — it has to “build” it.

Your WordPress site has two main “parts”:

  1. The code, which is mostly PHP (and HTML, CSS, and JavaScript)
  2. Your database, which is what contains your content (like the text of a blog post)

When someone visits your site, your server executes the PHP and sends queries to your database to assemble the finished HTML. 

This means two things:

  1. It takes some extra time for your server to deliver the HTML because it has to assemble it first.
  2. Your server uses more resources to serve content to visitors, which can be especially troublesome for high-traffic sites.

Page caching changes this behavior by storing the end-product — the static HTML — for a certain amount of time (typically a few hours). 

By storing the HTML, it’s able to deliver it to visitors without all that backend processing, which means:

  • Faster page load times.
  • Better performance under heavy traffic because your server has to do less work to deliver content to each individual visitor.

You should not use caching as a bandaid for other performance issues. But once you’ve optimized the foundational elements of your WordPress website, like your images and hosting, caching is a good tactic to add on top to further speed up your page load times.

How to Implement Page Caching on WordPress?

First, it’s important to note that many WordPress hosts already implement caching at a server-level. So before you use the plugin that we’ll discuss next, you should check with your host’s support to see if you’re already benefiting from page caching.

If your host isn’t already performing page caching, we recommend the WP Rocket plugin.

There are a couple of reasons we like WP Rocket as a caching solution:

  1. It has the absolute simplest setup process — as soon as you activate the plugin, it automatically sets up page caching. You don’t need to lift a finger, and it will even implement compatibility tweaks for popular plugins like WooCommerce.
  2. It implements a lot of other performance tweaks beyond caching.

Some of the other performance benefits that WP Rocket implements are:

  • Lazy load – waiting to load below-the-fold images or videos until a user starts scrolling down.
  • Gzip compression – compressing your website’s files at a server level.
  • Database optimization – clearing out unnecessary content in your site’s database.
  • Google Fonts optimization – optimize how your site loads fonts from Google Fonts.
  • Google Analytics optimization – optimize how your site loads Google Analytics.

Once you install and activate WP Rocket, it will automatically implement page caching and other basic tweaks right away:

Page Cache Dashboard

I’d recommend taking advantage of some additional features, though.

First, go to the File Optimization tab and enable minification for your HTML, CSS, and JavaScript:

Page Caching File Optimization

Sometimes minifying CSS and JavaScript can cause things to look funky on the front-end of your site. If that happens, just disable minification and your site will go back to normal.

Or, if you feel up to it, you can also manually exclude the specific scripts or styles that are causing issues from this interface. For example, if a specific JavaScript problem stops working when you enable JavaScript optimization, you can exclude just that file so that you can still benefit from optimizing the rest of your JavaScript. WP Rocket explains how to find the problematic files in this help article.

Next, go to the Media tab and enable lazy loading for images and videos:

Plugin Media Optimization

Feel free to check out the other settings, too — WP Rocket does a good job of explaining what the various settings accomplish.

Be Careful With Caching for Dynamic Sites

If you have a dynamic WordPress site, like an online course, membership site, or WooCommerce store, it’s important to understand that caching can cause issues for dynamic content.

For example, if you have a “course progress” page that lists each user’s personalized progress, you can’t cache this page because it needs to be different for each user. The same goes for the WooCommerce shopping cart and checkout pages.

That doesn’t mean you can’t use page caching — it just means you need to exclude dynamic pages from being cached.

If you use WP Rocket, it will automatically do this for popular plugins like WooCommerce. You can also manually exclude content from the Advanced Rules tab (here’s how):

Plugin Cache Advanced Rules

Step 5: Use a CDN (Especially for a Global Audience)

A content delivery network, or CDN for short, speeds up your site’s global page load times by delivering your static content from a network of servers around the world.

Without a CDN, every visitor has to download files from your host’s server. So if you picked a data center in Los Angeles, visitors from both San Francisco and London have to download files from Los Angeles.

Because of physics, physical distance still plays a role in how quickly data moves, so the visitor from London is going to experience slower page load times because the data has to travel further.

A CDN changes this by storing your data on a network of “edge servers” all around the world. So with a CDN…

  • A visitor from London can download your site’s files from the content delivery network’s London edge server
  • A visitor from Singapore can download your site’s files from the Singapore edge server
  • Etc.

While a CDN can be helpful for all WordPress sites, it’s especially helpful if your site has a global audience.

How to Use a CDN on WordPress?

If you’re using the Optimole plugin we discussed above, you’re already benefiting from a CDN powered by Amazon CloudFront, which has a huge global network.

While Optimole only uses the CDN for your images, you already know that images are a large percentage of your site’s file size, so this will get you most of the benefits of a CDN by itself. 

The only thing Optimole doesn’t handle is other static files, like stylesheets and JavaScript.

If you’re not using Optimole, another good option is BunnyCDN. BunnyCDN has a network of 36 servers around the world, with at least one server on every habitable continent.

It’s also super easy to use — all you do is…

Bunny CDN Settings page

You can try it out with a 14-day free trial.

Step 6: Use High-Performance DNS (Cloudflare)

This step is optional and highly advanced. You can still get a fast-loading site without performing this step – it’s just another way to make a small improvement to your site’s page load times.

When someone visits your WordPress site, their web browser needs to look up the IP address of your server before it can start loading your content. To do this, it uses something called Domain Name System (DNS), which includes your domain’s nameservers.

These nameservers are similar to your hosting — if you use slow nameservers, it will take longer for a visitor’s browser to get that important IP information, which means it takes longer for your website to load.

For example, in DNSPerf’s rankings, there’s a 0.1-second difference between the fastest-loading DNS and the slowest-loading DNS, which is actually a pretty big difference when it comes to your site’s page load times.

To speed up your WordPress site’s DNS, we recommend using Cloudflare for two reasons:

  • It ranks #1 in DNSPerf’s rankings, which means it’s one of the fastest DNS services that you’ll find.
  • It’s 100% free.

To use Cloudflare’s DNS, you’ll need to sign up for a free Cloudflare account and then change your domain’s nameservers to point to Cloudflare. You can follow this tutorial to get it working:

While Cloudflare offers other features like a CDN and security rules, you can also just disable those features and use Cloudflare as a standalone DNS tool.

Step 7: Use Optimized Plugins From Reputable Developers

There’s a common myth for WordPress sites that “more plugins means a slower-loading site”.

This is not true. Using more plugins will not automatically slow down your site.

However, using more unoptimized plugins will.

That’s the key difference. You could have hundreds of small, optimized plugins that have little effect on your site’s page speed, while a single unoptimized plugin could tank your load times.

We already covered one way to find unoptimized plugins after-the-fact by using a waterfall analysis.

However, you can stop a lot of performance issues before they happen by carefully considering each plugin that you install:

  • Use reputable sources WordPress.org and CodeCanyon are good options. While a plugin being listed in those directories doesn’t guarantee that it’s optimized, it does ensure that it at least follows some basic standards.
  • Read the reviews — do the reviews mention poor performance?
  • Check the developer’s reputation — see how responsive a developer is to support requests. You can even ask your own question to see what kind of help you get.

You can also install the plugin on a sandbox environment and run a waterfall analysis. If you’re using SiteGround, our recommended host, SiteGround lets you create staging sites on the GrowBig plan and above.

Speed Up WordPress Today

And with that, we’ve come to the end of our WordPress speed up guide.

If you run your WordPress site through GTmetrix or WebPageTest again, you should notice a big improvement in your site’s page load times.

And again, while we’ve gone into a ton of detail, it’s important to remember that you don’t have to implement every single tip on this list to get a fast-loading site.

Will your site be faster if you dig through the waterfall analysis and use Asset CleanUp to conditionally load scripts? Yes, most likely.

But if you feel overwhelmed by the waterfall analysis, you can still probably get your site under that 3-second mark if you…

  • Optimize your images with Optimole or ShortPixel AI.
  • Choose a high-performance WordPress host like SiteGround.
  • Use a lightweight WordPress theme like Astra and pick optimized plugins.
  • Implement page caching and other performance tweaks with WP Rocket.

Do you have any questions about how to speed up WordPress? 

Did you implement these tips and achieve a big reduction in your site’s page load times? 

Let us know in the comments!

Join 208,419 Subscribers

Get exclusive access to new tips, articles, guides, updates, and more.

Leave a Comment

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

Scroll to Top

Celebrating Astra's 900K+ Installs!

Days
Hours
Minutes
Seconds