Ever since Google announced the introduction of page speed as one of the metrics to determine SEO ranking, site owners have made it one of their top priorities to make their websites load quickly. Page load times also affect whether visitors drop off before the page loads completely. With a slow-loading website, you can lose a significant amount of traffic and conversions. In this guide, we’ll discuss a list of actions that you can take to speed up your WordPress website.
Why Is Page Speed Important?
There are two primary reasons why page speed matters to you as a site owner.
First, page speed impacts your SEO rankings. If there are two websites that are comparable in all other aspects of SEO, search engines penalize the slower website. It is unclear how much of a penalty is applied by page ranking algorithms, however it is a good idea to optimize every aspect of your website for speed.
Second, online users have a relatively short attention span. Unless someone really wants to check out your content, chances that a visitor just leaves your site before it loads go up with every passing second. They may also abandon their carts if the subsequent checkout process is slow — for instance, a study by Pingdom has shown that 38% of visitors left websites that took five seconds or more to load.
All in all, faster page load times help you get better search engine rankings and generate more page views and conversions. Plus, it leads to a better user experience.
Let’s now check out some tools you can use to measure page load time.
How to Measure Page Speed?
Before you check out various techniques to speed up your website, you should first take a step back and assess the current situation. This can help you understand how much you need to optimize your website. Moreover, testing your website prior to optimization provides you with a benchmark you can compare future test results to. Now, let’s see some testing tools that can help you assess your website depending on your needs, budget, and technology.
GTmetrix is a free, web-based tool to assess the performance of your WordPress website. Just head over to the GTmetrix homepage and enter the URL to test a website. You cannot set the test server region and browser settings in the free version, however the paid version gives you more control and the ability to maintain history.
GTmetrix returns three key metrics:
- page load time
- total page size
- total number of HTTP requests
In this guide, we will look at how to optimize all of these metrics.
PageSpeed Insights is a free, web-based tool by Google Developers that lets you assess your website performance. You simply need to enter your URL to begin testing.
The key offering of PageSpeed Insights is a focus on mobile devices. A website may behave significantly differently on a mobile device than on a desktop. While you cannot control which device the test is performed on, a benchmark provided by this tool does help in overall optimization.
WebPageTest is a free, open-source tool to test your website’s performance. It gives you much more control over the testing environment.
Not only can you decide the device and location from where the test is performed, but you can also craft meticulous step-by-step tests to generate custom metrics for your website.
Now that we have briefly discussed tools that can help you identify how fast your website is, let’s see how you can speed up your WordPress site.
1. Choose a Sufficiently Fast Web Host
When a visitor lands on a page on your website, their browser sends a request to your server to display that page. The time it takes for the server to respond strongly influences how long they need to wait. Irrespective of the efficiency of your website, the performance of the web server critically determines how quickly a visitor’s request is handled.
Before choosing a host, you should first select the type of hosting that you are looking for. Are you content with the relatively slow performance of a shared host, or do you require dedicated and specialized WordPress hosting? The choice is generally a trade-off between cost and speed.
Here’s our complete guide to selecting the fastest host for WordPress. In short, we recommend SiteGround if you are looking for a budget-friendly yet reliable solution. If you want the best performance and budget is less of a concern, you should try out Kinsta‘s managed WordPress hosting.
2. Use a Lightweight, Flexible Theme
The theme that you select for your WordPress site contributes significantly to page speed. Since most site owners wouldn’t modify a WordPress theme for performance, it’s important to choose a theme that’s efficient and loads quickly.
The general rule of thumb is to select a lightweight theme with minimal features depending on your requirements. You may consider our collection of the fastest WordPress themes to start your hunt for a theme. If you are looking for a free, lightweight theme, here are our best recommendations.
Can’t make a decision? Then, you should consider Airi, a free, lightweight WordPress theme that blends modern design elements with a multitude of customization options.
3. Use Plugins Wisely
You can attribute the growth of WordPress to the community that develops and maintains plugins. Plugins expand the functionality of WordPress to make it capable of much more. While you will find a plugin for any task that you can imagine, it is a good idea to selectively use only those plugins that you absolutely need for the working of your website.
Each plugin adds to the complexity of a WordPress site, so it is a good practice to periodically audit your website to assess each plugin. Ensure that you deactivate or remove all unnecessary plugins.
You should also check if plugins conflict with each other or your theme. The site health feature of the Health Check and Troubleshooting WordPress plugin can help you check for potential conflicts between plugins.
4. Optimize your WordPress Database
Your WordPress application connects to a database that stores all site-related data in the background. The database essentially stores all the content of your website, including but not limited to posts, pages, user registrations, comments, and settings.
When someone visits your website, they are just retrieving data from the database to view a page or a post. However, a user action such as a comment, upvote, or purchase leads to data generation. WordPress also automatically saves revisions that you make to your posts.
Request-response time between the database and your WordPress site can increase for two reasons. First, as your database grows in size, the execution of these queries takes more time. Second, cycles of data entry and removal can fragment your database, so different parts of your database can be stored in different locations within the filesystem.
Therefore, it makes sense to keep your database lean by removing unwanted data such as spam and unapproved comments, post revisions, and trashed posts. WP Optimize is a plugin that lets you optimize your WordPress database by removing old, redundant data and defragmenting the database.
5. Use a CDN to Deliver Resources
A Content Delivery Network (CDN) consists of a group of servers placed at strategic locations throughout the world. It is based on the premise that the download time of a resource depends on the physical distance between the client and the server.
A quick analysis by HTTP Archive reveals that a page on a typical WordPress site weighs about 2.3 MB in 2020. A significant part of this page weight consists of images (1.2 MB), fonts and stylesheets (280 KB), and scripts (470 KB).
If you store these resources on CDN servers around the world, a visitor from any part of the globe can potentially load them from a server nearest to them, bringing down the load time of the web page. We recommend checking out KeyCDN, a cost-effective CDN solution for site owners.
6. Get Your Images Ready for the Web
While we have covered the use of CDN to optimize the delivery of key resources to the client, let’s take a moment to optimize the resources as well. Images account for almost half of the payload and often serve as critical components of the design of a web page. Therefore, it is a good idea to follow some best practices to optimize images for performance.
First, you must ensure that you upload the images in the correct size. For instance, it doesn’t make much sense to use the same size logo for both the About Us page and the favicon. As the favicon is substantially smaller in size, you should resize your logo and upload a smaller version of it.
Next, you should also use the appropriate image type. For example, a JPG image is ideal for photographs and other complex images with a lot of color variations. On the other hand, PNG images work well for graphics that have fewer color variations, such as a screenshot. Finally, an SVG (Scalable Vector Graphic) works perfectly for an image that consists of simple geometric shapes, such as a logo.
Once you have created the images for your post, ensure that you also optimize them. Image optimization essentially means the compression of images to make them suitable for the web. You can either optimize them locally or use a plugin for the purpose.
If you want a WordPress plugin that takes care of all your uploaded images, you can use Imagify, a freemium WordPress plugin that optimizes your images in real-time. And, if you want to use a desktop app to optimize images before uploading them, you can give ImageOptim a try.
You can check out our roundup of the best WordPress image optimization plugins too.
Lazy Loading Images
Lazy loading is the process of downloading the full version of an image only when it enters the viewport of the browser while the viewer is scrolling down the page. This image optimization technique saves precious bandwidth for both the website owner and the viewer. Additionally, it reduces page load time by delaying the download of a significant portion of the payload.
While there are plugins that allow you to enable lazy load, it is worth nothing that WordPress is also considering adding it as a core feature.
7. Manage Static Files Efficiently
In addition to images, stylesheets and scripts account for a significant portion of the payload of a web page. So, let’s now see how you can efficiently serve these static files to your viewers.
First, you can minify your stylesheets and scripts to reduce the size of your resources. The process of minification involves removing those parts of a file that are not required for execution. These include whitespaces, comments, and unused code.
You can minify your resources manually using a service such as Minifier. However, for a WordPress site, it would save time to use a minification plugin such as WP Super Minify to minify all the resources on your site at one go.
Finally, you can enable GZIP compression to further compress your resources. GZIP compression is a technique that involves the server sending compressed files to the browser, which are unzipped once the download is complete. GZIP compression is a common feature in caching plugins (discussed below) too.
8. Optimize HTTP Requests
While we have talked extensively about the payload, we should also discuss how we send them to the client. You might have noticed that many issues flagged by performance assessment tools are related to HTTP requests. Typical metrics include how many HTTP requests your web page has, how many of them involve redirects, and how many DNS lookups the browser needs to make to download all the resources.
One simple way to reduce the number of HTTP requests is to combine similar files. For instance, you should have a single CSS stylesheet for your website. All custom scripts should be combined into a single file too. As the number of HTTP requests goes down, the page load time goes down as well. If you use a minifier plugin, choose one that takes care of combining similar files.
To optimize your HTTP requests, you can also minimize the number of DNS lookups. Every time the browser encounters a resource hosted on a new domain name, it needs to perform a DNS lookup to get the corresponding IP address. If you store your resources on a single domain, you can reduce DNS lookups. If you use a CDN to serve your static files, the number of DNS lookups is already minimized.
Finally, you should also minimize the number of redirects for static resources. A redirect takes place when the original location of a resource points to a new location, which essentially means that the browser has to make a new request to get the resource.
9. Enable Caching in WordPress
Caching is the process of storing a part of the page in a temporary location to quickly serve it to your visitors. Caching enables you to save server bandwidth and reduce page load times.
When choosing a caching plugin for your WordPress site, select one that is easy to set up and provides performance improvements with simple settings. If you have the expertise, you should get into the advanced settings to unlock additional speed benefits.
10. Update WordPress and PHP
WordPress and PHP are popular software undergoing active development. Enhancements such as new features, bug fixes, security patches, and performance improvements are incorporated into them every day.
Therefore, it is essential to update your WordPress, plugins, and PHP to the latest versions to keep up with these enhancements. However, before you initiate an update, ensure that you back up the current version of your WordPress site.
In this guide, we first covered why page speed is critical for a site owner to consider and optimize.
Next, we looked at some popular tools that assess how good your website is and how you can improve its performance.
Finally, we discussed the most important techniques to speed up your WordPress site, from using a sufficiently fast web host to regularly update PHP and WordPress.
Do you use a different technique to speed up your WordPress site? Do let us know in the comments below.
5 Steps To Speed Up
Your WordPress Site
Make your site run 30-40%
faster with a few simple techniques