I’m going to guess that, as an avid internet user, you prefer fast websites to slow ones. And if your online business is built on WordPress, I’m also going to guess you’re currently trying to land yourself in the former category.
It’s true that speeding up your WordPress site can help your website in more ways than one. Your users will be happier, your search engines will be happier, and your bottom line will be happiest of all. Unfortunately, WordPress doesn’t always make it easy to deliver blazing fast pages to visitors.
Here’s the good news: There are many ways to boost the performance of your WordPress website, and you can implement some right away. It just requires a bit of elbow grease on your part. In this post, we’ll discuss why it pays to have a fast WordPress site. Then, we'll share 25 ways you can optimize your load times.
Why should you speed up WordPress?
When checking out new websites, nothing makes me spring for the “back” button like a slow webpage. And I’m pretty sure I’m not alone here — site performance greatly impacts the user experience and largely shapes how visitors judge the quality of an online business.
There’s little room for error with page speed and patience. According to Google, your website should load in two seconds or less. Any longer and visitors start to lose interest. Page performance is also a ranking factor used by search engines including Google. The faster your site, the more likely you’ll land a coveted spot at the top of the SERP.
Now, WordPress doesn’t exactly specialize in speed right out of the box. This is due largely in part to how WordPress works: When someone visitors a page on your site, WordPress dynamically constructs the page by pulling data from various sources — like your WordPress database and theme files — then combining them into an HTML file that is sent to the visitor’s browser. Building pages “on the fly” like this isn’t always ideal for performance.
Plus, WordPress themes and plugins all consume valuable server resources, even if you’re not actively using them on your site. Too many things running on your web server at once will deplete its resources, slow down your pages, and thwart off conversions.
As we’ll soon see, many approaches to speed up WordPress are pretty non-technical, while others involve installing a plugin or even changing some of the code yourself (as long as you know what you’re doing). You may even begin to see improvements after taking just a few of these steps.
There’s no time to waste, so let’s dive in.
How to Speed Up Your WordPress Site
- Run performance tests.
- Choose a reliable hosting provider.
- Update everything.
- Use the latest version of PHP.
- Delete unused plugins.
- Install high-quality plugins only.
- Use a lightweight theme.
- Optimize images.
- Try lazy loading your content.
- Don’t host videos on your server.
- Install a WordPress caching plugin.
- Simplify your page designs and content.
- Tidy up your WordPress database.
- Limit or disable post revisions.
- Avoid redirects.
- Turn off pingbacks and trackbacks.
- Use a CDN.
- Compress files with GZIP.
- Limit external scripts.
- Don’t fall victim to hotlinking.
- Schedule tasks for low-traffic periods.
- Split long posts into multiple parts.
- Paginate posts.
- Paginate comments.
1. Run performance tests.
First, let’s understand where your site stands performance-wise. There’s no all-encompassing metric that sums this up, since performance varies by every visitor’s geographic region, internet connection strength, and whether your site is cached by their browser.
Page speed will also vary across your site’s pages, depending on the amount and type of content on each one. Website homepages are typically the go-to for estimating load speed, although you should also be testing any other particularly high-traffic pages as well.
To get the best tangible estimate, test your site with a free performance measuring tool like Website Grader. Just paste in your home page URL and see how your site performs. This tool and many others even provide speed suggestions which you can apply, then try again.
Be sure to test performance regularly, especially after adding new functionality. This will confirm your site continues to deliver pages at competitive speeds.
2. Choose a reliable hosting provider.
Quality web hosting is the foundation of a fast WordPress site. It’s essential that you choose both a hosting provider and a plan that meets your bandwidth and performance requirements. Most WordPress hosts offer several types of hosting: shared hosting, dedicated hosting, virtual private server (VPS) hosting, and managed WordPress hosting plans.
When choosing a WordPress hosting plan, you generally get what you pay for. On one end of the spectrum, there’s shared hosting. These plans let you host your website on the same server as a number of other websites. You can’t beat shared hosting prices, so newer WordPress users might pick this option to gain momentum online before upgrading. However, your performance will suffer if another site on your server gets a lot of hits, since you’re both running on the same resources.
Established websites with more content and higher levels of regular traffic should instead find a dedicated, VPS, or managed hosting plan from a reputable provider. These plans will allocate enough server resources to handle increased traffic without affecting load time.
If you’re in the process of choosing a hosting company or switching to a new one, have a look at our list of recommended hosting providers.
3. Update everything.
Updates are a part of life if you’re a WordPress administrator. WordPress core, themes and plugins all need to update in order to help your site run as efficiently as possible, among other things. Always be running the latest versions to optimize performance, keep your site secure, patch bugs, and ensure every feature and tool functions as it should.
4. Use the latest version of PHP.
PHP is the scripting language that powers all WordPress websites. It’s a server-side language, meaning that its files are stored and executed on the web server that hosts your site. Like themes and plugins, PHP also releases occasional updates to run more efficiently, which in turn helps your pages load faster.
The latest stable version of PHP is PHP 7, released in 2015. PHP 7 is a major performance improvement over PHP 6, and there’s really no reason to not run your website on it. See our guide to PHP 7 in WordPress to learn how to check your site’s PHP version and update it manually.
You can also check your hosting site’s documentation or contact support to see which version of PHP you’re using. If it’s not PHP 7, ask your host to update your site’s version of PHP.
5. Delete unused plugins.
Quality is better than quantity when it comes to WordPress plugins. Since each plugin is like a piece of mini-software on your website, too many running at once can negatively affect your site’s load times. Even if you’re not using a certain plugin, there’s a chance it’s doing unnecessary work in the background and consuming resources. It might be time to cut back.
Start by deactivating any plugins you’re certain you’ll never use again. Test your site after each deactivation, then delete these plugins after verifying that everything still works. Then, deactivate the plugins one-by-one to see which ones make a difference in speed. Consider finding lightweight alternatives to these plugins.
6. Install high-quality plugins only.
Now that you’ve taken care of the quantity part by cutting loose your unneeded plugins, make sure the plugins you do keep around are high-quality. The best WordPress plugins are coded in such a way that they only consume the server resources they need, when they need them. These plugins are also light on code and won’t occupy too much storage space on your server, and are updated regularly to keep up with WordPress core updates.
The best way to make sure your plugins are performance-friendly is by checking recommendation lists (we have plenty of those — start here if you’re interested), which usually factor in how well each plugin is built and maintained. Before installing a new plugin, check reviews and feedback for any complaints of poor performance, and re-run performance tests after you activate to ensure your speed hasn’t been significantly impacted.
7. Use a lightweight theme.
Like plugins, your active WordPress theme might be placing an unnecessary burden on your web server. Themes that are packed with high-quality images and effects might look cool, but they come at a cost. Fancy effects can require a lot of code, and many themes are programmed inefficiently, both of which inflate file sizes and slow your page performance.
Instead, pick a simple theme with only the necessary features for your pages. You can always add more effects later through plugins or custom CSS if you’d like. Our list of recommended WordPress themes is a great place to start your search.
8. Optimize images.
Large images are another common culprit of slow WordPress websites. To further raise your site performance, reduce your image file sizes as much as possible without sacrificing quality. The goal is to save space but avoid making users squint to see your visuals.
You can compress image files with Photoshop or any other image editing software. You can also try a WordPress image optimization plugin like Smush or EWWW Image Optimizer .
9. Try lazy loading your content.
If your WordPress features a lot of images, you can also implement lazy loading. Instead of fully rendering all images on a page at once when the page is first loaded, lazy loading only loads the images that appear in the user’s browser window, and defers loading the rest until the user scrolls down to them.
Lazy loading gives the impression of a faster page load time because your content loads gradually, instead of requiring your browser to do all the loading work at once. Besides images, lazy loading can be applied to other media like video embeds, as well as other page content like text and comments. Check out our list of lazy loading image plugins to get started.
10. Don’t host videos on your server.
Notice how I didn’t say “videos” above, but “video embeds.” That’s because, of all types of files you could store on your web hosting server, videos are one of the most resource-intensive. They consume space and can majorly slow down your page when loaded. Storing even one video on your serve can hurt performance.
Still, videos are a great way to engage visitors, so you shouldn’t ditch them altogether. Instead of putting videos in your media library, use a third-party video hosting service like YouTube, Vimeo, or Wistia. These services handle the storage for you, so all you need to do is place the video on your page with embed code. It makes no difference to visitors (they’ll still see the same video), but your user experience will greatly improve.
12. Install a WordPress caching plugin.
Often, WordPress performance issues can be chalked up to the way WordPress assembles web pages on the server side.
Every time a visitor requests a web page from a non-cached site, the PHP on your WordPress server has to retrieve all the relevant content from your WordPress database, assemble it into an HTML file, and send that file to the client. This method has its advantages, including saving server space and allowing for dynamic website content. But, it also takes more time and energy than sending a pre-written web page.
A caching plugin simplifies this entire process. It builds every HTML page on your site with PHP, then saves these full HTML pages which are sent to future visitors when requested. By skipping over the building process, your content reaches visitors more quickly.
13. Simplify your page designs and content.
Here’s a tip that applies to any website — if you want to reduce loading times, provide less content for browsers to load. In other words, simplify your designs.
Over the last 10 years or so, web design has seen a push toward more minimal designs. This makes sense for several reasons, including the fact that simpler pages simply consume fewer resources and will load more quickly across browsers.
Minimal web pages are also better for UX, since they’re less likely to overwhelm visitors compared to the cluttered designs that were once popular. Plus, simple pages are much easier to make responsive, meaning the page looks good across many different screen sizes, from desktop monitors to smartphones.
Starting with your homepage, take some time to evaluate the content of each of your pages, and trim anything that isn’t absolutely essential. This can be difficult, especially if you’ve invested so much in your current design, but it can make a noticeable difference in performance.
14. Tidy up your WordPress database.
If you’ve had your WordPress site for a while, chances are you’ve accumulated some old, unused files in your database. These files might be comment spam, leftover data from unused themes and plugins, old users, unpublished content, and old media, all of which take up valuable storage space and put unnecessary load on your server.
Plugins like WP Optimize and Advanced Database Cleaner will conduct an audit of your files and scrap any non-essentials. This is a much faster and safer alternative to deleting the files off your server yourself. It’s also safe to manually delete unused media files directly in your WordPress media library.
15. Limit or disable post revisions.
Whenever you save a WordPress post, WordPress automatically creates a copy of your revision and stores it in your database, instead of deleting the previous version. This allows you to revert to any previous version of your post if you ever need to.
While post revisions are a helpful feature, they can pile up in your database and slowly affect your site’s overall performance. By default, WordPress saves unlimited post revisions, but with a small tweak you can limit the number of saved revisions per post or disable post revisions altogether.
To limit post revisions to a set number, open your site’s wp-config.php file (located in the root folder of your site) and add the following code to the bottom of the file:
define( 'WP_POST_REVISIONS', 4 );
This code limits each post’s number of saved revisions to four. You can change the number to whatever you prefer, or set it to 0 to turn off revisions, though this is not recommended if you’re not tracking your changes elsewhere.
16. Avoid redirects.
We get it. Things happen, posts get deleted and relocated, or you need to rearrange your site’s structure. When this happens, the best way to avoid 404 errors is by implementing permanent redirects.
Still, try to limit the number of redirects on your WordPress site. Each one adds on an extra bit of load time. Especially if you have multiple redirects sending visitors to other redirects, and so on. Redirects are often unavoidable, but optimizing your site architecture early on will keep them to a minimum and avoid messy redirect chains.
17. Turn off pingbacks and trackbacks.
Pingbacks and trackbacks are two WordPress technologies that alert external websites when you link to them in your site’s content.
For example, if your blog post contains a link to hubspot.com, you can configure WordPress to notify the owners of hubspot.com that you’ve linked to their website. They also work the other way around — if someone links to your site, you can be notified.
Pingbacks and trackbacks can be great for marketing efforts, since you’re letting other sites know that you value their content, and may receive backlinks in return.
Even so, many WordPress experts agree that the cons outweigh the pros here. Namely, they use server resources unnecessarily and open the door for spammers and DDoS attacks. If you want to track backlinks, you can do so with an external analysis tool, and there are plenty of other effective methods to earn backlinks to your site.
Long story short, we recommend you disable pingbacks and trackbacks. To do so, go to Settings > Discussion in your dashboard and uncheck the first two options, Attempt to notify… and Allow link notifications…
18. Use a CDN.
Another common cause of poor performance is real-world distance. Your pages will tend to load on devices that are farther away from your web server’s physical location. This specifically impacts international users and users in remote areas. Fortunately, you can lessen this effect with a Content Delivery Network, or CDN for short.
CDNs are easy to set up and manage on any WordPress site. Your hosting provider will likely offer a CDN service as part of your plan or as a paid integration, and your CDN takes care of all content delivery for you. Popular CDNs include Cloudflare and StackPath.
19. Compress files with GZIP.
GZIP is a lossless compression method widely used for sending files over the internet. GZIP can reduce file sizes by up to 70%, and compresses files in much less time and with less computing power than other compression methods. When you apply GZIP compression to your website, your files will be sent to users more quickly since you’re using much less bandwidth than with an uncompressed file.
There are many plugins that can enable GZIP compression on your site. It’s a common feature of speed optimization plugins, which make the process as simple as checking a box. If your website is hosted on an Apache server (it probably is), you can also enable GZIP compression manually by adding the following code to your .htaccess file:
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
AddOutputFilterByType DEFLATE application/x-font
AddOutputFilterByType DEFLATE application/x-font-opentype
AddOutputFilterByType DEFLATE application/x-font-otf
AddOutputFilterByType DEFLATE application/x-font-truetype
AddOutputFilterByType DEFLATE application/x-font-ttf
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE font/opentype
AddOutputFilterByType DEFLATE font/otf
AddOutputFilterByType DEFLATE font/ttf
AddOutputFilterByType DEFLATE image/svg+xml
AddOutputFilterByType DEFLATE image/x-icon
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/xml
20. Limit external scripts.
External scripts aren’t always a bad thing. You’ll probably need at least a couple on your site to utilize the tools you want. Always weigh the cons of taking on additional plugins and tools that make use of external scripts, and consider if the added functionality is worth trading for the potential performance hit.
21. Don’t fall victim to hotlinking.
Many of these tips involve making changes on your own website to optimize WordPress performance. With hotlinking, however, someone else is to blame.
Hotlinking is when one website uses a resource that is hosted on another website. When another site hotlinks your resource, they’re displaying it on their website without the monetary or performance cost of hosting the content themselves.
Suppose I see a cool infographic on another website that I want to include in my own blog post. The right thing to do would be to download the image, upload it to my server, and cite the image source appropriately. If I were to hotlink the image (which is, to be clear, the wrong thing to do), I would link to that file as the source of the image and load it from their website.
To learn more about hotlinking and keep it from happening to you, see our guide to preventing hotlinking.
22. Schedule tasks for low-traffic periods.
Scheduling background tasks is an excellent way to keep your website healthy without eating up a chunk of your day. Things like backups, updates, and security scans can be automated to run at regular intervals.
If you’re someone who likes to schedule these things out, try to run your background tasks during periods of lower traffic. That way, you’re not putting extra strain on a server that’s already handling an increased number of visitors. Refer to your traffic analysis tool of choice to learn the best days and times of day to schedule tasks.
Additionally, consider adjusting the frequency of your background tasks if you still think there’s a performance impact. For example, you could switch from running daily backups to running backups every other day or once per week.
23. Split long posts into multiple parts.
If you’ve implemented the steps above and are still dissatisfied with load time on some pages, the issue might be that they might simply contain too much content. Lengthier posts with high volumes of images and dynamic information will always take longer to process — consider breaking them up into multiple posts instead. Usually, this can be done with little interruption to the user experience.
24. Paginate posts.
Alternatively, you can split up lengthy posts into multiple pages if you don’t feel a piece merits multiple blog posts. This is helpful not just for performance, but also for readability. For example, you can split a post into different sections by chapter to make posts easier to process in chunks.
Note that this method is best for long posts with a lot of media, which would otherwise load slower than you want. Otherwise, keep your shorter posts to one page and minimize clicking between pages. To aid readability in this case, you can add a table of contents section with jump links to each section.
25. Paginate comments.
You might not think of comments strictly as site content, but WordPress has to load your comment section on the page the same as your main content. If your comment sections are particularly active, you can save load time by paginating your comments. By placing comments on a separate page, you give the original page less content to load and let readers load comments on a post only if they want to.
Fortunately, WordPress lets you easily paginate your comment section: Navigate to Settings > Discussion, check the box next to Break comments into pages…, and set the number of comments per page (50 by default).
Alternatively, you can disable your comment section by unchecking Allow people to submit comments on new posts on the same screen.
No time to waste!
Like many aspects of running a WordPress website, speed optimization is your responsibility. Thankfully, there are several strategies you can implement to optimize your load time and provide the most satisfying, speediest user experience. It's worth spending a bit of your time to save your visitors a lot of time.
Editor's note: This post was originally published in October 2020 and has been updated for comprehensiveness.