If you don’t do anything to fix the problem, your WordPress website will become sluggish as you add more content, new pages, and grow your site-visitor numbers. This will ruin the experience for your customers, and make it harder for you to achieve your business goals.
This detailed guide covers all the best ways to speed up WordPress.
Are you ready to take your website speed to the next level?
We have the tools and know-how to help you achieve your goals.
Why WordPress Site Speed Matters
You may be wondering why you should worry about site speed. Your website’s ardent followers should be able to stick around long enough for the site to load regardless of how long it takes, right? Unfortunately, this isn’t true for everyone.
Slow Speed Leads to Lost Visitors
If you run a completely unique service, it is possible that some of your visitors will ignore a slow loading website to get what they want. If they have an alternative, however, the love for your website will disappear quickly. This is even worse when your website’s traffic is largely made of organic visitors (from the search engines). These users will just return to the search results. The following statistics will help you understand the relationship between your site page load speed and user behavior.
- In the last two decades, our attention span has dropped from 12 seconds to 8 seconds.
- Nearly 50% of website visitors expect a website to load in two seconds, and 40% will abandon the site if it takes longer than three seconds to load.
- A second of delay can reduce page views by 11% and reduce conversions by 7%. For big businesses like Amazon, this could mean losing $1.6 billion in sales per year.
- Mozilla recorded an extra 60 million downloads for the Firefox browser after making its pages 2.2 seconds faster.
With these statistics, it is obvious that page load speed plays an important role in user retention and conversion.
Speed is a Ranking Factor on Google/Bing/Yahoo
The big search engines also understand the importance of page load speed. Remember, they are always looking for new ways to deliver an excellent experience for their users, and a site that takes ages to load goes against this. Savvy webmasters understand that speed plays an important role in determining your site’s position in search results.
This is because a slow-loading site means a higher bounce rate. If enough people leave your site a few seconds after clicking through to it, the message that this communicates to the search engines is that your site isn’t useful to visitors—even if you have the right content. This will lead to a lower vote.
The situation is different on mobile, especially for Google. They have stated that their page load speed is a ranking factor in their mobile index. Add this to the fact that more people are using mobile devices to get on the internet, and you can understand why page load speed is more important than ever today.
How to Test Site Speed
You might think your website is fast because it loads quickly on your device, but other users could be having an entirely different experience while accessing your website on their devices. Most web browsers will store the files for any website you visit frequently in the cache. Once you start typing the address, it will “prefetch” the data. A user visiting the website for the first time will have a different experience. Even users in different geographical locations will see different load speeds.
This is why you should use trusted site speed testing platforms to get a near-accurate measurement for your website’s load speed. Some of the best tools to test your site speed include:
PageSpeed Insights is slightly different from the other performance testing tools on the list because it doesn’t show the actual loading time. However, it shows you the state of things on your website and things you can tweak to speed up your website.
How Fast Should Your Site Load?
Before you test your website speed, you’ll probably need an estimate for how fast your website should load. There is no hard and fast rule. However, a page load speed of less than 2 seconds is widely acceptable. This doesn’t mean you should lose any sleep if your site’s speed falls within this time. Improving your website further by a few milliseconds can improve the user experience for thousands of your site visitors.
How can you speed up your WordPress performance?
30 Ways to Speed Up WordPress Performance
Below are some of the top ways to speed up your WordPress performance. These WordPress optimization techniques have been proven to significantly increase site speed. They are not arranged in any particular order.
1. Choose a Good Host
Your hosting solution is the foundation of your WordPress website. This is why you need to choose a reputable hosting provider and also avoid picking hosting plans with affordability as the number one criteria. The few dollars saved will lead to slow site speed and regular downtimes. If you intend to run a high-traffic website, choose a web hosting provider that focuses on speed. Such a provider will have put in place all the necessary measures to deliver a fast-loading WordPress website.
2. Choose a Server Closest to Your Visitors
Some web hosting companies allow you to choose the data center for your website. If your target audience is in a particular region, you need to ensure you pick a server closest to them. As a rule of thumb, it should be a server located on the same continent at the very least. If the web host has a server in the country you are targeting, even better.
Your focus should be on cutting down the distance between your audience and the web hosting server. If this option is not available with your preferred hosting provider, you may have to use a Content Delivery Network (CDN), to ensure faster page load times. There’s a bit more on CDNs further down this list.
3. Premium DNS Is Better than Free DNS
A Domain Name System (DNS) is the connection between a domain name and web servers. While we see a web address like yourwebsite.com, servers can only see an IP address like 317.45.617.106. DNS helps make this conversion in milliseconds. There are free DNS options available, but a premium one will be faster and more reliable.
The speed and reliability provided by a premium DNS ensure that this important step in rendering a website is completed in the fastest time possible. The free DNS from the average domain name registrar will always be slower in comparison.
If you are under a DDoS attack, a premium DNS also offers better security overall. If you can’t get a premium DNS, however, you can consider using Cloudflare DNS. This service provides some of the benefits of a premium DNS, free of charge.
4. Always Optimize with Mobile-first in Mind
Google’s mobile-first index was launched on March 26th, 2018. Since that time, its ranking systems have moved from analyzing desktop versions of websites to mobile versions. This helps ensure a better search experience for mobile users.
Speed is one of the most important factors to focus on when it comes to mobile-first optimization. The average mobile user is more likely to leave a website if it loads slowly because they will witness every second wasted in the loading.
Desktop users have a different (often better) experience because they have more CPU power and are likely to be connected to faster internet. So, as you optimize your WordPress site, always pay attention to the effects on mobile. You don’t want your websites to be one of those that take 15 seconds to load.
5. Use a Fast Framework/Theme
There are tons of beautiful WordPress themes available for use on any project. However, some of them are too bulky and loaded with features you may never need. This causes the website to load a lot slower than it should.
When choosing your theme, focus on options that excel at the basics. If you must use a bloated theme for a specific reason, you need to have the skill to edit out elements you don’t need. Alternatively, you can consider commissioning a bespoke theme design with only the necessary elements required to run your website.
6. Use the Latest Versions of WordPress and Its Components
WordPress is one of the most supported platforms on the web. New versions are released from time to time, with bug fixes, new features, and more. By updating to the latest version, you can keep your website running more efficiently and ensure it doesn’t slow down.
Apart from keeping your website snappy, a fully updated WordPress infrastructure keeps your website secure from the latest threats. This is important because some slow websites are victims of a cyberattack.
While updating your website, don’t forget to update your plugins as well. They can also hold vulnerabilities that can compromise your entire website.
7. Use a Content Delivery Network
The distance between your website’s server and the user can affect the page load speed. If your website is hosted in the US, for example, a user in Australia will have to wait longer than someone else in Canada for your website to load fully. If you can’t choose a server that is close to all your potential users as we have discussed above, you should definitely use a Content Delivery Network (CDN).
A CDN stores your website data across multiple server locations around the world. When a user visits your website, the files are fetched from the server nearest to the individual. This significantly reduces the length of time it takes to load the website. Cloudflare’s CDN is a popular option for many web owners.
8. Optimize Your Homepage to Load Quickly
Your homepage is the most important part of your website, and the one most people are likely to visit. This is why you should take some steps to ensure it loads as quickly as possible. Some of the things you can do to optimize your homepage include the following:
- Show excerpts instead of full posts.
- Even with the excerpts, keep the number of posts on the page below 7.
- Delete all unnecessary widgets from the home page.
- Keep share buttons only in posts.
With these simple optimizations, your homepage will be clutter-free and load quicker.
9. Utilize Caching
With caching, your pages and posts are converted to static files that are served to your visitors, thus reducing the load on your server. If you choose a hosting provider that focuses on speed, chances are that they will use server-side caching which is significantly faster than using a plugin. You should only consider WordPress caching plugins if your hosting provider does not do server-side caching. Some of the most popular caching plugin options include:
10. Clean up the Database
As you use your WordPress site, the database will slowly fill up with data, including blog text, images, comments, settings, user data, and more. While some of these are necessary, there are tons more data that you don’t need clogging up the database.
Ideally, you should clean your WordPress database every three months. This will ensure the database only contains useful data and prevent a slower load time. This process can be completed manually, or with the aid of a database optimization plugin.
11. Set up Monitoring
You need to set up a process that allows close monitoring of your website speed, so you can know immediately if it starts dropping off. Some of the speed testing sites we mentioned earlier have automated processes that will monitor your website’s speed, and notify you of any changes immediately. Pingdom and GTmetrix are two of the best examples.
GTMetrix, for example, will not just monitor server response time, but also visual render. You will get an email about the page load speed and how long it takes for the website to show usable content for your site visitors (also known as Time to Interactive).
These automated monitoring processes are offered for a fee, but it is an investment you should consider.
12. Optimize Images Using Smart Compression
Images are responsible for the bulk of your website’s size. This is why you should pay attention to optimizing and compressing them. A plugin like ShortPixel can use lossless and lossy compression to reduce the size of your image files, sometimes by as much as 70%, without affecting the overall visual quality of the images.
13. Gzip/Brotli Compression
Zipping up a file before sending it reduces its size and makes it easier to send to someone over email. This is also how Gzip works with a website. When it is installed, it automatically compresses your web page files. This will speed up the page load times and also save bandwidth. When someone visits your website, the browser will automatically unzip the web page files.
14. Identify Plugins That Are Slowing You Down
Having too many plugins is one of the many reasons why some WordPress sites are very slow. With too many plugins, there will be a lot of overhead for your webserver to handle. You need to do an audit of the plugins you have installed.
Which of them is no longer necessary? Is there a single plugin that has the features to replace a few of them? With this audit, you will be able to see what you need and what you don’t.
One of the things you should watch out for during such an audit is to find out the last time the plugin was updated. If it’s been a long time, you will find the following warning on its page:
You should avoid plugins that are no longer maintained as they could have performance or compatibility issues. Even if they do actually work, they can reduce your page speed or make your website vulnerable to security threats. In such a case, find out if there is a replacement or a new way to achieve the same thing.
15. Optimize Web Font Performance
Web fonts play an important role in your page speed. This is why you need to only use fonts that you need. The best formats are WOFF and WOFF2. If you’d like to use Google fonts on your WordPress, ensure you are using a combination that won’t have an impact on your page speed, such as Open Sans and a web-safe font like Arial.
For even better results, use base64 encoding to turn your fonts into a single CSS file, and then store them in localStorage. A browser’s native cache gets flushed very frequently, especially on a mobile device. By storing to localStorage, the font file will get cached persistently. This approach alone can improve your website speed by 700 ms or more.
16. Optimize Font Awesome Icons
The best way to optimize Font Awesome icons is to use your CDN to accelerate its delivery. When you host your Font Awesome in this manner, it will load on the same connection as your other website assets. This prevents an extra DNS lookup.
17. Lazy Load Images, Videos, and Disqus
With Lazy Loading, the loading of an element is delayed until it is needed. In WordPress, it involves not loading certain elements on a page until a user scrolls down to where the element should be. While lazy loading is common for images, you can also do the same for videos and comment management solutions like Disqus.
For lazy image loading, you should consider using the ShortPixel Adaptive Images plugin. This plugin offers automatic WebP delivery, lazy loading, smart cropping, and SVG placeholders. Its lazy loading feature loads images gradually as a user scrolls down a page, only loading images that are in the visible portion of the webpage. This improves the user’s experience by giving them an impression of speed. Caching plugins like Autoptimize also have the option to Lazy Load images.
For lazy video loading, one of the best plugins to use is Lazy Load for Videos. It works by replacing embedded videos with a clickable preview image. If you have a lot of videos on your website, this plugin can greatly improve the speed of your WordPress site.
If you use Disqus as your commenting system, Disqus Conditional Load will stop it from creating around a dozen HTTP requests when someone loads a page on your website. An important feature of this plugin is that it is SEO friendly. Lazy loading comments won’t stop Google from crawling them.
18. Avoid Hosting Videos on Your Own Site
While WordPress can host videos perfectly, it is not a good idea to use it to host tons of videos. Firstly, you probably don’t have enough bandwidth on your hosting plan to hold multiple videos on your website’s server. Secondly, hosting videos on your site will make the website very large and a lot harder to back up.
Instead of hosting videos directly on your website, you should use platforms specifically designed to host videos such as YouTube, Vimeo, and Wistia. Copy the link and paste it into the WordPress editor and the auto-embed feature will still play the video directly on your website.
19. Avoid Too Many Advertisements
Although you probably want to monetize your website as much as possible, you should avoid having too many advertisements. Apart from the fact that they could hamper the user experience, too many ads with HTML content have a significant impact on your site’s loading time.
If you must have ads on your website, use ad networks like Google Adsense and Media.net. They don’t have as significant an impact on page load speed because they are properly optimized.
Minification plays an important role when it comes to WordPress speed optimization. The process involves removing unimportant characters from your WordPress HTML and CSS that are not important when it comes to loading a page. Some of these characters include block delimiters, comments, newline characters, and white space characters.
This cuts down the amount of code that has to be requested from a server, and therefore, speeds up slow loading websites. The average WordPress caching plugin has the minify option. Some of the best options you can use include Autoptimize and Better WordPress Minify.
21. Reduce Miscellaneous HTTP Requests
As we have seen above, reducing the number of HTTP requests is important when you are looking to Optimize WordPress speed. Here are a few ways you can reduce Miscellaneous HTTP requests.
Disable User Gravatars
Disabling user Gravatars and using only local avatars is not optimal in some cases, but it is necessary if you are looking to make your WordPress site as fast as possible. To do this, download the WP User Avatar plugin. In the plugin settings, check the box that says “Disable Gravatar and use only local avatars” and choose a default avatar option.
Use Disqus for Comments
If your blog gets a fair amount of comments, Disqus is the best solution that allows you to manage the comments without making tons of HTTP requests for every page load. However, this only works if you lazy load Disqus like we mentioned earlier.
Stop scripts from loading on every page
Some plugins like Contact Form 7 or various social sharing plugins are important, but they load their scripts on every single page, thus adding to the page load speed. You can stop this from happening with another plugin called Permatters.
It is a paid plugin, but it is a good investment if you are looking for a little bit more speed. Once you activate the plugin, you can ensure that scripts only load on pages where they are necessary. This means that the Contact Form 7 script will only load on your contact page, and social sharing plugins will only load scripts on posts only.
Although the latest WordPress contains a script that allows you to easily embed videos, images, social media posts, etc. with just a click, it is not necessary for everyone. You can still grab embed codes off of the social platform or YouTube and use it.
22. Disable Hotlinking
With hotlinking, you make an image available on your website using its URL instead of uploading it directly onto your website. This means that your website will be available on your website but it will be loaded from its original location. While this would be quite convenient for you the hotlinker, it amounts to theft of the image source’s server resources.
There are several ways to prevent hotlinking. Here is a detailed guide to help you.
23. Disable Pingbacks and Trackbacks
WordPress allows pingbacks and trackbacks by default. Pingbacks and trackbacks allow websites to communicate with each other, making it possible for you to get notified every time another website links to yours. Unfortunately, each pingback and trackback creates a separate request. This means that if your website is fairly popular and receives a lot of trackbacks and pingbacks, the page load speed will be affected.
You can turn off these requests in your WordPress admin panel. Go to Settings>Discussion and uncheck the boxes shown below:
24. Specify Image Dimensions
If you upload an image that has a 700px width in a column that is 400px wide, the image will be scaled down to 400px whenever it is loaded on a page. This means every time the image loads, an additional 200px has to be downloaded that will never be used. This can slow down your WordPress site a great deal.
This is why when uploading images to WordPress it’s important to make sure they are properly scaled. It will require using Paint or Photoshop to edit images before you upload it, but it can considerably improve your site load speed. Alternatively, you can upload multiple image resolutions and have your website serve the right resolution depending on the user’s device. This is known as the responsive image technique.
25. Fix the Admin-ajax.Php Slow Problem
The WordPress Heartbeat API was introduced in version 3.6 to improve session management, auto-saving, and revision tracking. It uses admin-ajax.php to run AJAX calls from a web browser. Unfortunately, it can lead to high CPU usage, as well as many PHP calls. With the heartbeat control plugin, you can manage the frequency of the WordPress heartbeat API.
26. MySQL Tuning
Optimizing MYSQL is also a great way to speed up load time on WordPress. This is specific to your setup and environment, but you should look for the MySQL/MariaDB configuration file in /etc/my.cnf. The settings you should monitor include the following:
You can also use the MySQL Tuner script to get an overview of your server’s performance. It won’t repair anything automatically; rather, it will provide improvement recommendations. MySQL tuning primer script and phpMyAdmin are other alternatives you can consider.
28. Split Comments into Pages
It is always a good thing to have lots of comments on your blog posts. This is a great indicator that you are creating content that resonates with your target audience. However, they can become a problem as they grow and make your site slower than it should be.
For this reason, consider splitting your comments into pages. To do this in WordPress, go to Settings>Discussion, and check the “Break comments into pages” option. Keep the top-level comments to a maximum of 20 per page.
29. Control the Number of Post Revisions Stored
When you save a post to draft, WordPress keeps every version of the draft, even long after you have published the post. So if you have ten drafts for each of your dozens of posts, WordPress will keep all of them, adding even more data to your database. The more information you have in your database, the slower it is to query. The Revision Control plugin solves this problem. With it, you can ensure that only the latest two or three versions of any post are saved.
30. Keep Your Site Secure
If your site gets attacked, all the WordPress optimization hacks we have discussed thus far won’t do much to improve the speed of your website. You need to monitor your access logs to see if there have been lots of attempted brute force attacks on your website.
Apart from bored cyber attackers, your competitors can also launch a Distributed Denial of Service (DDoS) attack on your website. This will take up your server resources, slow down your site page load speed, and force your users to go elsewhere.
Keeping your WordPress core and plugins updated, as well as regular monitoring of your log files and server resources, is an excellent way to maintain the security of your WordPress site. You can also protect your website from attacks using Cloudflare or Sucuri.
Stay away from security plugins: they always slow down websites. Instead, ensure that you work with a hosting vendor that takes care of security. If you have to use a plugin to secure your website, perhaps it is time that you considered switching to a more reliable hosting company, one that can satisfactorily handle all the security issues for you.
The speed of your website is very important. It can affect everything from conversions and bounce rates to search rankings and user experience. Fortunately, there are many things you can do when you find out that your web pages are loading slowly.
We have highlighted more than two dozen different options for you to consider. You don’t need to implement all of them. Look for the options that are most relevant to your website right now and go with them. Even a single change can shave off some milliseconds from your page load speed.