Optimizing the WordPress loading time is a must for every website owner, as the loading time massively impacts the perceived quality of your website.
This guide will give you a starting point in optimizing your website to get your loading time below two seconds - ideally below one second. I've structured it into four different areas. All of them play an important role in making WordPress load fast. You can think of loading speed optimization as an orchestra which you're directing.
In the end, you'll hopefully be able to achieve results similar to my site:
I tried keeping this guide as easy to follow as possible. You've probably seen articles about making WordPress load fast that have 40+ points - this is none of them. Actually, there are four areas I worked on to get my site to load within .6 seconds (< 1s on average):
Table of Contents
- Fast WordPress hosting
- Themes & page builders
- Cache configuration
- Image optimization
- CloudFlare DNS settings
- Helpful resources and tools
Fast WordPress hosting
One of the most important aspects that make my WordPress site load so fast is having the right hosting. If you have a shared hosting account that costs only a couple of bucks per week, I'm afraid you cannot expect a fast loading site. 🤔
The reason is that those shared hosting accounts don't have the technical infrastructure to make WordPress load fast. That infrastructure requires updated PHP, a
Things to consider when choosing a WordPress hosting company
Choosing a hosting company is not an easy task, as there are so many things to consider. Every hosting company is running marketing campaigns to convince you that they're the best. There is so much money to be made for hosting companies, of course, they're always claiming that they're the best.
To help you find the right hosting company that allows for a 🏎️ fast loading WordPress website, I've put together a few criteria for you:
- How much traffic do you get? The hosting company you choose should ideally support at least double that number. That will save you from upgrading when your audience grows.
- Do they offer 24/7 🕝 support? You'll want at least their chat to be present round around the clock.
- The server location. 🌎Ensure that the server of your hosting company is physically close to the majority of your audience.
- How do they compare in reviews from FB hosting groups? Having positive 💬 conversations going on about a hosting company always is a good thing.
Recently, I started seeing more and more load test evaluations on hosting companies being published. While those are pretty technical, they show the hard numbers and facts on how many concurrent website visitors a host can handle. If you're interested in seeing those, please ping me. I'm not linking them here, as I think they're too hard to understand if you don't have a programming background.
If you're not sure whether your host is capable of making your site load within one second, feel free to join my Facebook group I Use WordPress and post a question there.
My recommended hosting company
If you're wondering which host is the right one for your WordPress site, I recommend 👉Cloudways. All my sites are hosted on Cloudways since 2013 (they sponsored my WP Summit), by now my agency runs 8 servers and 100+ websites on Cloudways.
Since Cloudways only manages WordPress sites and does not offer domain or email services, here's my recommended setup:
You can manage your domain and emails on any service you want. If you're now using a host like GoDaddy or HostGator, you can keep the domains and emails there.
Once you sign up for a Cloudways account, you can point your domain from your current hosting company to your new Cloudways account. Their support is super helpful with that. You don't change anything basically, except for one DNS setting (which again, the Cloudways support can help you with).
If all of this sounds too difficult or techy for you, my team and I got your back. When you use our affiliate link for Cloudways to sign up, we will connect your domain for free to your new WordPress site and even do the migration! Simply use the affiliate link and send me an email after you signed up 🙂
Alternatively, you can also go with Liquid Web. Their WordPress offerings are, in-part, managed by one of the most important influencers in the WordPress field, Chris Lema. I've been working with Chris directly, being a contributor to their blog and publishing articles on WordPress. LiquidWeb is stepping up their WP hosting game massively.
More thoughts on hosting
Honestly, there is much more to talk about when it comes to hosting. I could walk you through things like SSH access, SSD hard drives, how much GB of traffic are allowed per month, what software architecture the host is running, whether you can upscale your server as traffic goes, and so on.
The point is, that you will need to move away from cheap hosting when you want your site to load faster than one second. I'm not saying that you need to spend $30 - $40 per month on hosting for a single site, but those $3/mo shared hosting plans aren't built for fast websites.
With Cloudways and LiquidWeb, I've named to alternative hosting companies you can use for less than $10/mo and site. My choice would be Cloudways at this point, as I have more experience in using them compared to LiquidWeb. A $17/mo Digital Ocean server at Cloudways will be plenty of punch for the start - that's what I use on WP Mastery right now.
My team and I can help you move to a faster web host in the scope of our WordPress care plans.
Fast loading WordPress themes & page builders
Now that we've got hosting out of the way, let's talk about the next big area that impacts how fast your WordPress is loading - your theme and page builder. By now, almost all themes come with some sort of page builder plugin that allows you to create layouts via drag and drop. I use such a page builder on this website, too.
However, it's the code-quality of your current theme and the code-quality of your page builder that influence how many scripts, stylesheet files, and other stuff is being loaded from the server.
When somebody visits your website, think of your site as a warehouser. That warehouser is running around collecting data and files, trying to get all files and data as fast to your website visitor as possible.
lessfiles and data is needed to load the website, the faster that warehouser can gather them and the faster your website will load
The problem with many of today's WordPress themes and page builders is, that they load unnecessary data and files. You can use them to build galleries, testimonial sliders, embed videos, and much more. But some of them always load all their functionality, even if you didn't use it on a particular post or page.
To give you an example: a friend of mine recently reached out and asked me why his website would always load a script from the video hosting service Vimeo, even though he had no Vimeo video embedded. The answer was, that his theme was coded in a way to always load that script.
Other themes do that with script for testimonial sliders, galleries, and so on. Heck, even the famous Contact Form 7 plugin loads his form scripts on every page - regardless whether that page has a form on it or not. That has been one of the reasons I moved to Josh's Caldera Forms. 😍
It's quite simple to identify if plugins load their scripts on pages or posts where you don't use them. I have another example for that at this current point on my website. When I check my landing page with GTmetrix, I can see that the landing page loads a Stripe script without Stripe being used on the landing page. It clearly shows in the YSLow section for adding expires headers and indicates that I could further optimize the landing page.
Ok, now that we've covered themes and page builders quite extensively, it's time to talk about caching. In fact, I used a caching plugin for optimizing how scripts on my website are loaded and you should do that, too.
My favorite caching plugin is Swift Performance Pro. I use it on WP Mastery and am considering to implement it in my WordPress Care Plans as well. There are a number of powerful caching techniques you can leverage with Swift Performance Pro. 🚀
and stylesheets in WordPress
Reducing the number of requests it takes to load your WordPress site is crucial for making your website load faster. I've gotten mine down to 41, starting from 150+. Some websites my care team works on start with 300+ requests, from all sorts of plugins.
The same holds true for your stylesheets, the CSS files that control the look and feel of your site. Almost every active plugin on your website loads CSS files and your theme + page builders likely load multiple CSS files. Each of those files creates a single request. By merging all stylesheets into a single file, you can reduce that number of requests massively.
Browser caching in WordPress
There is more to
Let's define browser caching:
A temporary storage area in memory or on disk that holds the most recently downloaded Web pages. As you jump from Web page to Web page, caching those pages in memory lets you quickly go back to a page without having to download it from the Web again. In order to ensure that the latest page is displayed, the browser compares the dates of the cached page with the current Web page. If the Web page has not changed, the cached page is displayed immediately. If the Web page has changed, it is downloaded, displayed and cached.Encyclopedia at PCMag.com - https://www.pcmag.com/encyclopedia/term/38971/browser-cache
Just from this definition you can see how browser caching plays a crucial role in your website loading speed optimization process. In fact, if people come to your site more than once, they'll experience the benefits of proper browser caching. You can specify the timeframe for how long a visitor's browser should store the cached files. They're valid until your visitor manually clears their browsing history.
As you can tell, Swift Performance Pro again makes setting up browser caching super simple. The screenshot above shows one of the configuration screens from the plugin, with the exact settings I currently use on WP Mastery (at least at the point of writing this article). Obviously, I removed the cache path to not give away security-relevant information about the location of my website on my server.
If you feel brave, you don't need a caching plugin to set up browser caching on WordPress. You can set up caching rules directly in your .htaccess file on the server. That would reduce the loading time even further, as your website would need to load one plugin less. If that put question marks all over your face though, please do not touch your .htaccess file.
On WP Mastery, I use the Swift Performance Pro plugin instead of direct caching rules because the plugin gives me much more options to speed up the site than just browser caching.
Server-side caching on WordPress hosts
One of the biggest reasons I love hosting my sites at Cloudways servers is their clever server-side caching infrastructure. A server is nothing but a computer running the software needed to show your website
You might not know it, but WordPress consists of thousands of files and is connected to a database, where it stores your pages, posts, login information and much more.
Every time somebody comes to your site, WordPress loads a few hundred files and runs queries against the database to load the post or page that's supposed to be displayed to the visitor. You can imagine, that this is not a fast process.
Let me explain how server-side caching helps speed this up, using a visitor coming to your blog page as an example:
On the first visit to your Blog page, the server has to load all the files and query the database, which is relatively slow. If your host has server-side caching, your website will automatically store all data of the Blog page in the server cache. For the next visitor, the website does NOT load all the files and also does NOT query the database. Instead, it simply loads all information from the cache - which is MUCH faster.
Can you see how important server-side caching is? It saves server resources and makes pages that get visited regularly load a lot faster than they normally would.
The server-side caching on Cloudways is particularly effective because it uses caches with various techniques. They all work hand-in-hand without you having to configure anything. Other hosts have neat setups for server-side caching as well, be sure to check in with the support team of your current hosting company!
If you want your WordPress site to load faster than one second, you definitely need to implement gzip compression. Again, if you feel 🤓 brave, you can configure that directly in your .htaccess file. If you can do that, skip to the next section, as you'll already know what gzip compression does to your website's files.
Still here? Great! Let me explain:
Gzip compression means that, in order to reduce the amount of data transferred when loading your website, the files that make up your WordPress site get 📦compressed.
Think of that process as putting images in an archive and then using the Zip program (Winzip, 7zip, et al.) to shrink that archive in size. Nothing else is happening with the files of your WordPress site - but on the fly. Once your website gets visited, your server automatically compresses your files. If you have a proper server-side caching set up, this plays together nicely 😉
Just as with the other techniques that manipulate your files, please test the impact on gzip compression on your website thoroughly.
Images are one of the biggest reasons for slow loading WordPress sites, as most images on websites are either way too big or have not been saved with the correct file specifications. Usually, website owners can shave off quite some kilobytes of their website's size by working on their images.
There are two factors that control how fast images can load: their dimensions and their file size. Both need to be at their best settings for your website to load quickly.
Luckily for us, speed analysis tools like GTmetrix give us very specific instructions for making our images load fast. It just takes a bit of time to go through them. The reports show you exactly, what images you need to work on and can even download optimized versions.
That list is incredibly
So the first step in uploading images that load fast is to know the correct dimensions of the image. Say, for example, that your post thumbnails are set to
At this point, you might be wondering how to find out how big an image on your blog should be. Don't worry, there are plenty of tutorials and it's quite straightforward once you've done it a couple of time. Check out this post to learn more.
Besides uploading images in the correct dimensions, you also need to ensure that the image files aren't any bigger than they need to be. Image tools often include metadata like information about which 📷camera took the image, the 🗺️location, and other stuff. That information is as irrelevant for showing images on your site as it gets.
Good for us, that Swift Performance Pro can automatically reduce the file size of your images directly while you're uploading them. You don't have to do anything, Swift handles the image optimization in the background and helps that your WordPress site loads within one second.
Of course, there are also other tools you can use to reduce your image file sizes. Kraken is a very popular service, as are WP Smush and EWWW Image Optimizer. No matter which one you choose, what matters is that you reduce the file size of your images.
CloudFlare DNS settings
Lastly in this post, I want to touch upon DNS settings. It works as follows:
- Somebody wants to open my website and enters
wpmastery.xyz in their browser address bar.
- The browser asks the Internet provider of your visitor "who is
- The Internet provider runs through various servers and - at some point - comes to a DNS server that knows that the domain
wpmastery.xyz is connected to the IP address 22.214.171.124.
- The browser connects to the server at 126.96.36.199 and the server delivers the website to the visitor.
This is a very simplified explanation of the role DNS plays
One of the fastest DNS services I have used is CloudFlare. Originally my plan was to use CloudFlare as a security service, but that was loading too slow. Maybe I didn't configure CloudFlare properly, but I wasn't able to get loading times below one second when using their security service.
However, their platform still manages the DNS entries for WP Mastery. I'm on their free tier currently and this is how you can get started yourself.
Helpful resources and tools
Articles for further 📚reading:
- 7 ways to fix a slow WooCommerce shop
- Common bottlenecks that can cause slow WordPress sites
- Ways to speed up your WordPress site (from the Cloudways blog)
My preferred service providers and plugins:
- Cloudways (for hosting)
- CloudFlare (for DNS)
- Swift Performance Pro (cache plugin)
WebarxSecurity (firewall plugin)
We provide one-off services to speed up WordPress loading times, click here to get a free quote.
If you're interested in having us manage your entire website, click here to learn about our WordPress Care Plans. Prices start from $100/mo.