Do you feel the need for speed? That is, to speed up WordPress?
If you're running a WordPress website, speed is of the utmost importance. A slow website can frustrate users and cause them to leave before they've had a chance to explore all that your site has to offer.
In this article, we'll discuss why WordPress optimization is important, the factors that affect WordPress performance, and show you how to speed up WordPress websites.
Why Do I Need to Speed Up WordPress?
A WordPress website needs to be fast in order to provide a good user experience. When a website takes too long to load, users will often leave before they've had a chance to explore all that it has to offer.
That's detrimental to a business, as potential customers may never learn about what you have to offer. Additionally, Google says website speed is a ranking factor, so a slow WordPress site could negatively impact your SEO.
There are many factors that affect WordPress performance, including the hosting environment, the theme and plugins you're using, and the size and complexity of your content. In order to speed up WordPress, you'll need to identify which factors are affecting your site speed and then take steps to improve it.
Let's take a closer look at some key reasons why you want to speed up WordPress.
Better customer experience with a fast WordPress website
Let's face it. People are busy and impatient. They expect quick results and want to get to their answer right away.
A WordPress website that is fast will make the people who visit it happy. They won't have to wait a long time for it to load and they can explore everything on the website.
Think about your own experiences. When you get to a website that loads slowly, are you willing to wait, or do you leave and look for another website with the information you want?
It's important to keep in mind that people are visiting your website from all over the world. They might not have access to high-speed internet, so a fast website is even more important.
You're in Competition
Like it or not, WordPress websites compete with each other to earn visitors. You need to have the right information that matches the intent of what the visitor wants, and you need to present it quickly.
You need the right content to attract your visitors and you need WordPress optimization to keep them on your website. If your visitors experience poor performance on your website and your competitor has a smooth experience, you're going to lose traffic and business.
Higher Google ranking for speed
Google takes website speed into account when ranking websites. The faster a website loads, the higher it is likely to rank. This is because Google wants to provide the best user experience possible, and a fast website is more likely to meet that goal.
In addition to website speed, Google also looks at other factors such as website content, authority, and user experience. But if your website is slow, it's likely that you won't rank as high as you could.
Having a slow website can reduce a user's dwell time on a page, and also increase the bounce rate. When a user spends less time on your site and leaves, rather than checking out other pages, it tells Google that you may have a poor user experience on your website.
Remember, Google considers searchers to be their customers, not yours. Google wants to provide the best and most relevant responses to a search query. They use signals like dwell time and bounce rate, as well as your page speed, as ranking factors.
When you speed up WordPress, you're providing a better experience for your visitors and their actions also inform Google to affect your page rank in search results.
How Do You Measure WordPress Site Speed?
There are a few different ways to measure website speed. One of the most popular tools is called Pingdom. You can use this tool to test the speed of your website from different locations around the world.
Another way to measure website speed is by using the Google PageSpeed Insights tool. This tool will analyze your website and provide feedback on how you can speed it up.
You can also use your web browser's built-in developer tools to check the speed of your website. In Google Chrome, you can do this by opening the Developer Tools panel (press F12 or Ctrl+Shift+I) and then going to the Network tab. From here, you can reload your website and see how long it takes to load.
You can also use the GTmetrix tool to measure your website speed. This tool shows you how your website loads, and what could be causing slow loading times, and provides recommendations on how to speed up your site.
GTmetrix has a waterfall display that breaks down the time of each element in your page to show how long it takes to load. You can identify anything that causes a significant delay in your page load time and correct it.
In this example, you can see the time for each element to load. The purple color shows how long an element waits before loading. The beige color shows blocking time, or time when a user was unable to interact with an element on the website.
Knowing what elements keep your page from completely loading or allowing a user to interact with it are things you can correct to provide a better customer experience and help your page rank.
Google uses other criteria than page speed to rank pages
It's important to speed up WordPress as a ranking signal, but it's not the only ranking factor that Google uses. As you can see, the Disney site doesn't have great performance. However, it ranks well in Google.
That's because Disney is a popular and authoritative site. CNN has some of the most wretched performance scores you can imagine, but it ranks highly because it's an authoritative site with information relevant to search intent.
So, speed up WordPress to improve your ranking, but don't forget other important ranking factors such as content and authority.
Test page speed before and after making changes
How do you know if a change made on your WordPress site affected its performance?
You should speed test your website before and after you make changes to it because it can help you see how the changes affected the speed of your website.
Engineers test before and after every change to ensure they understand progress or failure. The speed tests give them data to show the before and after of a change.
If you don't speed test, you're left with anecdotal evidence that something is or isn't working.
How Do You Speed Up WordPress?
WordPress page speed affects both the front side that your visitors see and also the WordPress admin dashboard that you use. Different aspects of performance optimization, or lack of it, can affect how you and your visitors experience your site.
To get started, you need to make wise decisions for your site, such as:
To boost WordPress speed, we have several recommendations below to tell you what you need and why you need them to enhance your WordPress speed optimization efforts.
1: Use a reliable web server
When I want to optimize WordPress performance, I always start with the web server. The truth is that the hosting provider you choose impacts your site speed. You need to understand the server resources available to you to ensure that your hosting company provides what your WordPress site needs.
When choosing a WordPress hosting provider, there are some key criteria you need to understand. Sadly, some hosting providers won't tell you the details you need to know. A reliable hosting provider tells you what you need to know about the service and resources they offer.
Here are the criteria you should ask about and understand for each WordPress site that you manage.
Overall RAM – Depending upon the type of WordPress site you're running, your RAM requirements may vary. A simple WordPress site with 5-7 pages may do well on 128 MB of RAM. However, a community site with several concurrent users may need a minimum of 2 GB of RAM, and likely more depending upon how many users you're serving.
CPU Cores – A single CPU core can do one task at a time. A server with 2 cores can multitask, so you get a performance benefit from simultaneously processing tasks. Most shared hosting providers won't dedicate a whole CPU core to a WordPress website. Instead, you get timesharing access to the CPU. If a neighboring site on the same web server consumes a lot of the CPU, the other WordPress sites on the same host suffer as a result
Storage – Make sure you have enough disk storage for your site. Not only do you have the core WordPress files, but you also have to host the images and any WordPress plugins you load. The database grows as you add more content to your WordPress site, also.
Location – One of the key factors in a website's speed is its proximity to the users it serves. If your primary audience is in the USA and your server is in Bulgaria, it's going to slow the site's speed relative to your desired visitors because even a network operating at full capacity takes time to move those bits from one place to another.
Another factor that weighs on a website's speed is shared hosting. A hosting provider may overload a server beyond its resources, much like overbooking a flight, because it figures some of the WordPress websites on the same server won't be active.
However, another problem occurs when a WordPress site on shared hosting is overactive. That robs performance from its neighbors. There's nothing you can do about it because shared hosting providers typically don't make promises about performance or resources that they can't keep.
In order to make sure that your web hosting provider dedicates the server resources you need for your site, I recommend getting a Virtual Private Server (VPS), if not your own dedicated hardware server. A VPS is often a better choice for site performance at a reasonable cost.
I use and recommend Cloudways. Cloudways isn't a direct hosting provider. Instead, it works with services like Vultr, DigitalOcean, Amazon Web Services, Google Cloud, and Linode.
My own website on Cloudways uses a Vultr HF VPS, which offers premium performance for fast site loads at a reasonable cost. A Vultr HF server with 1 core and 1 GB of RAM costs $13/month.
However, its performance is vastly superior to shared hosting providers which charge more than double and don't offer a web hosting server with dedicated RAM or CPU resources. In fact, they may place limits on how much traffic can visit your site before increasing your cost.
Cloudways allows you to scale your server's resources as you need to grow. You also get to choose the location where your web server resides so it's close to your desired audience.
You can find cheap WordPress hosting providers that only cost a few dollars per month, but they're often cheap because the hosting company overloads the servers with multiple WordPress sites. With a Cloudways VPS, you know that you're not sharing server resources with a neighbor that's the equivalent of a meth lab in the apartment next door.
2: Use a fast WordPress theme
The default WordPress themes often exist to show new features in the latest WordPress core release. Think of them as a demonstration rather than the theme you need to use for your WordPress site.
When choosing a WordPress theme, you need to look for criteria just as we did when choosing a web server.
When choosing a WordPress theme, you need to look for the following criteria:
There are many great WordPress themes available that meet these criteria. Some of my favorites are Astra and Kadence.
These themes are lightweight and fast loading, which is important for two reasons. First, speed is a ranking factor in Google search. Second, speed improves the user experience on your website.
Astra is a popular WordPress theme because it's lightweight and fast. It's also easy to customize with built-in options for colors, fonts, and layout. It's responsive, meaning your WordPress site will look great on mobile devices as well as laptops and desktop computers.
Both Astra and Kadence have free themes, but you can get more features and benefits using the paid versions of these WordPress themes.
Astra is one of the fastest WordPress themes on the market, and it's a source of pride for the developers to keep it that way. With a default WordPress site, Astra loads in half a second.
I'm such a fan of Astra that I purchased the Growth Bundle Lifetime Deal, which provides license to many products and services related to Astra.
Astra has regular updates and it's well documented.
3: Use WordPress Block Editor (Gutenberg) instead of page builders
One of the big changes in WordPress site speed over the past few years came from the change in the default WordPress editor.
The project, called Gutenberg, created a new block editor that allowed much greater flexibility in creating WordPress pages and posts. However, there's another benefit to using the WordPress Block Editor.
It's screaming fast!
In fact, it's so fast that many WordPress users have switched to using it exclusively, even if they don't need the extra flexibility.
The speed of the WordPress block editor comes from its design. It uses a technique called “lazy loading”, which means that only the blocks you need are loaded when you're working on a post or page. This makes the editor much snappier.
If you're using a page builder, chances are it's loading every element on the page, even if you're not using it. That extra code can slow down your WordPress site speed.
To get started with the WordPress Block Editor, simply create a new post or page and experiment with the different blocks.
If you're not using the WordPress Block Editor yet, I recommend that you give it a try. It's fast and easy to use, and it can speed up your WordPress site.
Not only does WordPress come with its default blocks, but there are a plethora of 3rd party blocks available for you to use.
Brainstorm Force, the same company that makes Astra, also creates a set of FREE blocks called Spectra (formerly Ultimate Add-ons for Gutenberg).
You can find plenty of help to get started building beautiful web pages using Gutenberg. This video shows you some examples and resources to use.
4: Optimize images (size and dimensions)
Images do a great job to help you communicate to visitors on your WordPress site, but they can also affect site performance if you don't optimize images to load quickly.
When you upload images to your WordPress site, they are automatically resized to a width of 640 pixels. However, you may not need that many pixels for the image to look great on your website.
You can manually resize an image using a photo editor like Adobe Photoshop or GIMP, or you can use a WordPress plugin like ShortPixel to do it for you.
In addition to size, another important factor in image optimization is dimensions. Images that are too large can cause your WordPress site to load slowly. It's best to resize images to the largest dimension they will be used on your website.
For example, if you have an image that will be used in a blog post that is 700 pixels wide, you don't need to upload an image that is 2000 pixels wide.
Image resolution comes from the dimensions of the image, such as width and height. Another factor that affects image size is image quality. You don't need print-quality resolution like 300 dots per inch (DPI) to display on a screen. Use a lower image quality like 72 DPI to reduce the size of your images and speed up WordPress to deliver better site loading speed.
Different file formats can affect website performance, also. JPEG and PNG are the most popular file formats for images. Next-Gen formats, like WEBP (pronounced “weppy”) can dramatically optimize images used on your web page.
Some older browsers don't recognize the WEBP file format, but a plugin like ShortPixel can deliver the best image file that a browser recognizes.
While ShortPixel can resize images that you serve, it's always best to use a tool to optimize the size of the file that you upload to save on disk space and server processing time to resize images.
When using ShortPixel, you have options to select for compression:
You're always in charge. You can set defaults for image compression, but retain the ability to change the compression on a specific image file.
5: Leverage browser caching
A WordPress site builds pages dynamically. Rather than storing a complete HTML file, WordPress assembles the page it delivers as it's requested. As you can imagine, this approach has its pros and cons.
Dynamic sites can display components of information that may change each time the page displays to a viewer. If you want to personalize a site and mention a user logged-in user by name, such as in a membership site, there are advantages to having a dynamic display.
You wouldn't want to call everyone Phil, for example.
On the other hand, sometimes it's advantageous to show a static page that doesn't change because that's faster. Even faster is keeping a page in RAM so you don't have to even take time to load a file.
You can use caching plugins to help boost WordPress speed.
Browser caching stores websites on your computer so that they don't have to be downloaded again the next time you visit the site. This can speed up how quickly a website loads, especially if there are a lot of images on the page. You can use a WordPress caching plugin like WP Rocket to make it easier for your browser to cache files.
WP Rocket is not only the easiest caching plugin I've ever used, but it also provides me with the fastest load times compared to any other WordPress caching plugin that I've tested. It's my favorite WordPress performance optimization tool that I use to reduce load time.
Here are a few benefits that WP Rocket provides.
CSS (Cascading Style Sheets) is a style sheet language used for describing the presentation of a document written in a markup language. A style sheet is a collection of rules that tells a web browser how to display a document written in HTML or XML.
For instance, a CSS style tells WordPress if you want to display text in a specific color or size. Your CSS files contain many instructions specifying how you want to decorate your page. Changing CSS files allows you to quickly revise the colors or other presentation aspects of your WordPress site.
CSS gets used to style all HTML tags, including the document's body, WordPress themes and plugins use CSS to style their content.
By minifying CSS, you can speed up WordPress by reducing the size of the CSS files that WordPress needs to load.
Minification reduces the amount of code in a website. It removes useless spaces, characters, and formatting from software code to make it smaller. It may also improve the code's efficiency by renaming variables to use fewer letters without breaking functionality.
Enable GZIP compression
You've probably heard the term “GZIP compression” before, but what does it actually mean?
GZIP compression is a process used on web pages and files to reduce the size of the data being transferred.
By compressing your data, you speed up your website's load time.
WP Rocket can compress web pages on the server and decompress them in the browser. By decreasing the size of the files, your visitors get a faster load time of your pages.
Enabling GZIP compression is one of the easiest ways to speed up WordPress.
Use lazy loading
Lazy loading is a way to speed up WordPress by not making a visitor wait for all the images on a page to load at once. Images that are not visible on the screen will not be loaded right away. This makes the page faster to load because there are fewer images for the browser to download.
We mentioned lazy loading as a benefit of Gutenberg blocks earlier, but you can also lazy loading for images. This means you only spend time loading the image to a browser when the viewer is ready to see the image.
If part of a web page isn't visible within the browser, there's no need to make the user wait to load the entire page before they can start interacting with it.
Caching plugins are smart enough now to show what the user needs to see and use lazy loading to delay spending server resources from requesting files from the WordPress media library or making external HTTP requests for something that isn't visible on a web page.
Optimize the WordPress database
A clean database is a fast database. When your WordPress site makes database queries, it has to search the content inside of the database to find the correct result.
The WordPress database gets filled with temporary data that can cause a slow WordPress website when you make a query.
There are transient files, post revisions, comments, categories, tags, usernames, and more.
WordPress post revisions allow you to keep a history of changes to a post or page so you can revert back if needed. Perhaps you deleted something and wish that you didn't make that mistake.
Post revisions can save your bacon and allow you to restore the information that you mistakenly deleted.
The problem with post revisions is that they can also clutter your WordPress database with useless records that you no longer need.
Are post revisions going to greatly affect your website performance?
Unlikely. WordPress database searches ignore post revisions when making a page call to display something to your WordPress site visitors. The only time the WordPress database looks at post revisions is on the editing page.
In other words, too many revisions slow you down when editing and that's why you may want to limit them in your WordPress database.
If the WordPress admin dashboard seems slow, part of the problem could be due to your WordPress database. You can improve those database queries by taking out the trash.
WP Rocket allows you to schedule database optimization so it seems to happen in the background for you.
6: Use Reliable and Fast DNS
DNS (Domain Naming System) is the protocol that directs IP addresses to domain names that humans can understand.
Instead of going to 18.104.22.168, DNS allows you to enter disney.com into your browser and it takes you to the server at this IP address (among several servers).
As with anything else, the translation takes time to process. The speed of this translation from a human-readable form to an IP address that computer networks understand is part of the waiting time before you see the page that you desire.
If you want to find the DNS providers with the best performance, visit the DNSPerf site to see an example like this one:
These are just the top 10. You'll see many more on the full display at DNSPerf. Some of the big names in the Internet business aren't at the top of the list, either.
However, I put some emphasis on Cloudflare. Not only is it one of the biggest players, but you can also see it's one of the fastest. Another perk is that you can use it for free.
Cloudflare is more than a fast DNS provider. It also easily integrates with other tools and services, like WP Rocket or Ezoic ads.
If you use Cloudflare for nothing other than the fast and FREE DNS service, you'll be a happy camper. However, it does more.
There's a bot fight mode tool that prevents undesirable network bots from wasting your WordPress site resources. There's an attack mode that allows you to shut down unruly clowns who want to take over your site.
Cloudflare also provides a proxy to prevent attackers from knowing your site's IP address. You can even use it as a content delivery network to position your WordPress site content on servers around the world to reduce load time for visitors in different geographic locations.
Then there are the paid services, but that's another story for a different article.
Fast and reliable DNS service should be a part of your WordPress speed optimization toolkit.
7: Use a Content Delivery Network (CDN)
A CDN (Content Delivery Network) is a bunch of servers that are spread out around the world. When people visit your website, they can get the content from the server that is closest to them, which makes things faster. You can use a CDN to speed up your WordPress website.
The chart above shows the services provided with different pricing plans on the Cloudflare CDN. For many WordPress sites, the free plan is sufficient and offers services you won't find on other CDNs.
For example, the Universal SSL Certificate ensures browsers see your site as safe and secure, which is another Google ranking factor.
Another good CDN provider is Bunny.net. It's a low-priced CDN storage service with outstanding performance.
As you can see, Bunny.net CDN has lower latency and higher global throughput than many competitors. The basic service offers less than the free service at Cloudflare, but it's a good option to use if you don't wish to use Cloudflare DNS.
There's a more expensive plan that offers image optimization.
Either Cloudflare or Bunny.net provides an excellent CDN to enhance your website performance.
8: Minimize external scripts and HTTP requests
Another WordPress speed optimization technique is to minimize external HTTP requests and scripts.
Perfmatters is my secret weapon to optimize scripts and external scripts, not to mention other services we'll discuss below.
Let's start with the Script Manager.
This screen is available for each Page or Post on your WordPress site. There's a section for each of your WordPress plugins.
In the upper-right corner, you can see the size that each of the WordPress plugins adds to the total size of the page. The toggle switch next to the size allows you to enable or disable the scripts for that plugin on the specific page, which impacts the load speed of the page.
Alternatively, you can toggle individual scripts within the page.
This list goes through all the WordPress plugins on your site, so you can truly fine-tune the load time of your Posts and Pages.
You may not know this, but WordPress plugins don't just load scripts on pages where they're used. The load on EVERY page.
So if you use a page builder like Elementor on a few pages only, the scripts for Elementor load on every page of your site.
One of the clever things about the way Perfmatters handles script is that you can build rules to determine where the script gets used or disabled.
When you disable the entire block, this rule appears. Now you can determine the status by location, user, or device. If you're familiar with Regex, you can craft your own rule to specify the script permissions on the bottom field.
Where possible, you want to reduce calls to external sites that load resources. Google Analytics and Google Fonts are two examples.
This is another area where Perfmatters can help with those tasks.
Ironically, Google Analytics has a number of performance concerns. It creates additional third-party requests and has a limited cache lifetime. Perfmatters can help you fix this by hosting your Google Analytics script locally. If you use the MonsterInsights Google Analytics plugin, PerfMatters integrates nicely with it.
Perfmatters also works with Google Analytics 4, so it's prepared for the future.
You can disable Google Fonts or load them locally with a simple switch in the Perfmatters user interface. With your fonts stored locally, you have another way to improve load speed for your pages.
9: Disable or Adjust WordPress Heartbeat
The WordPress heartbeat is a function that sends requests to the server to keep track of any changes that have been made to a post or page.
Heartbeat can cause high CPU usage and a plethora of AJAX calls.
Perfmatters makes it easy to disable or adjust the heartbeat to avoid CPU resource issues.
If you don't want to completely disable the heartbeat, there's an option to only allow it when editing posts or pages, which is when you want to use it.
10: Hide your WordPress login page
Perfmatters has a feature to hide your WordPress login page. I don't use this for security. After all, security by obscurity is not security at all.
Sooner or later some crafter attacker will find your hidden login page.
However, most attacks come from bots who are looking for the default login page. That means they aren't analyzing your site to find a hidden login.
What's the benefit of hiding your login for WordPress performance?
It's simple. Every time some bot attempts a brute force login, your WordPress site has to process the attempt. That takes cycles from your CPU and also causes your RAM usage to increase as PHP loads the script repeatedly to handle a login attempt.
If you move your login URL away from the WordPress Core location, those bots won't cause your server to launch and process the wp-login.php script.
I've had sites under attack that had a very low load speed merely because of bot attempts to brute force login to my site.
Once I moved the login URL, the problem went away.
11: Lazy Load Images
As a reminder, lazy loading is a technique to save time loading elements only when needed to display in the browser. We often think of this technique used with images, but Gutenberg blocks also use the same technique to improve load time.
This idea is so popular that many different WordPress plugins can do this for you.
Those are just a few examples mentioned earlier in the article. Here's a caveat to this performance benefit.
Pick one tool to perform one task. You don't want to have each of these plugins attempting to perform the same task. Otherwise, you may run into conflicts that are difficult to diagnose and correct.
Lazy loading for images, iframes, or videos is a wonderful thing. Just pick one tool to do it.
12: Update WordPress and all plugins
Updating WordPress core and plugins can speed up your website. Newer versions of WordPress and plugins often include speed improvements and bug fixes.
When you update, be sure to backup your website first. Then, follow the instructions for updating WordPress and plugins.
13: Ditch Jetpack
The Jetpack Photon module speeds up image loading by using the WordPress.com Content Delivery Network (CDN).
While this sounds like a great idea, in practice, it's not always helpful.
I've found that images served from the Jetpack CDN often take longer to load than images served for your web hosting server.
While Jetpack includes many seemingly useful services, the truth is that it's slow and will reduce your page speed overall. Many WordPress users will tell you that there are better alternatives than Jetpack.
14: Delete unused plugins
Unused plugins can slow down WordPress because they take up valuable resources on your server. They can also cause conflicts with other plugins or the WordPress core.
It's important to delete unused plugins to speed up your WordPress site for security reasons, also. Even a deactivated WordPress plugin still has its code on your site. An attacker can potentially access your WordPress host and gain access to your site by taking advantage of a vulnerable plugin.
Social Warfare is a popular WordPress plugin. It allows you to add social sharing buttons to your posts and pages. It's a great plugin, but like any plugin, it's not perfect.
In December of 2017, a security vulnerability was discovered in the Social Warfare plugin. This vulnerability allowed attackers to inject malicious code to take over 70,000+ WordPress sites.
15: Remove Unnecessary Plugins
It's easy to collect plugins. Sometimes you need to perform a task and choose a plugin to help. For example, you may need a plugin to export all of your URLs to perform a site audit.
Review your plugins on occasion and ask yourself if you truly need everyone there. If not, remove it. You can always add it back later if you have a need.
In order to speed up WordPress, it's important to optimize your website for faster performance. There are a number of things you can do to achieve this, including installing plugins to lazy load images and updating WordPress core and plugins. You may also want to consider ditching Jetpack in favor of a more lightweight plugin or deleting unused plugins.
Overall, taking the time to speed up WordPress can be well worth it in terms of improved performance and security.
By following the advice in this article, you should see a significant improvement in your WordPress performance optimization.