In the digital world, everything is about speed and efficiency. And out of all the website performance issues, website speed is one of the leading culprits of losing visitors to your WordPress website.
If your website loads slower than it should, there’s little doubt that your traffic and bottom line are being directly affected. After recognizing this fact, many developers and business owners are left wondering how to speed up WordPress sites. The following information will help you understand why fast loading times are essential and includes a few tips for increasing your WordPress site speed.
Effective Methods to Speed Up Your WordPress Site Performance
If you want to do your part to increase your WordPress site speed, there are a variety of simple tactics you can do on your own. Allowing your site to be cached by your host is one of the simplest ways. Here are a few other tips you can use, but please note that we recommend testing any changes in a local development environment before changing anything on your live site.
1. Conduct a Site Speed Diagnosis to Accelerate Your WordPress Performance
Understanding how fast your website loads is the next step towards improving site performance. Tracking site speed is advisable should you install a plugin or make some other change to your site and want to see how it affects site load times.
To analyze load speed, most people rely on Google PageSpeed. But you can also try using a tool like the WP Engine Website Tester for WordPress-specific site speed tips on how to make your site run better. After you insert your site’s URL, you’ll be emailed a custom analysis regarding how fast your site loads and specific recommendations to speed it up. You can also input a specific page to analyze its page load time.
2. Delete Unused Plugins and Themes
Aside from the fact that you should always keep your plugins and themes up to date, deleting unused ones is the next step to a speedy site. Not only do unused plugins and themes present security vulnerabilities, but they can also detract from WordPress website performance.
To delete the unused WordPress plugin, you’ll first need to deactivate it. Then you can go to your inactive plugins list and delete the ones you no longer want.
To remove an unwanted WordPress theme, simply go to Appearance > Themes to delete the ones no longer in use.
3. Clean Up Your Media Library
Another simple solution to resolve performance issues is to remove unused media. Over time you might start to accumulate images that are no longer used. To free up space, you should consider removing unused media.
To remove unused media manually, You can use a plugin like Media Cleaner to dispose of unused media or you can do so manually. To manually remove unused media, simply go to Add Media -> Media Library -> Unattached and then delete those files no longer in use.
To learn more about how to clean up your WordPress media library, check out this helpful article.
4. Clean Up Your Database
If left unchecked, your WordPress database will start to accumulate clutter over time. This unnecessary bloat can slow down your site. However, with regular cleanups, you can reduce your database size for faster loading.
For instance, post revisions can take up a huge chunk of unneeded space. If you have a post which is 100KB of data and there are five revisions of that post, the total space wasted is about 500KB.
Cleaning up your database can be done manually through phpMyAdmin, although the process can be tricky and damaging if you don’t know what you’re doing. If you aren’t a technical whiz, installing a plugin to accomplish this task is the safer way to go. WP-Sweep and Advanced Database Cleaner are both safe bets to comb through your database and get rid of things like old revisions, spam comments, MySQL queries, and more.
Over time, CSS, HTML, and other source code files can build up and cause your site to run like molasses. To give your site a speed injection, you should consider minifying its code.
7. Optimize Images
Images are imperative to keeping a site visitor engaged. While your site may contain a ton of beautiful imagery, it’s a good idea to optimize these images to achieve faster page load times. There are multiple ways you can optimize your images, including compressing images, adding alt text and titles, and creating an image sitemap. To learn more about how you optimize images, check out this article, How To Optimize Your Images For WordPress.
8. Lazy-Load Long Pages
For one-page sites and sites which have a long home page, Lazy Loading can be a real time saver. Lazy Loading essentially prevents the elements lower down on your page from being loaded until the visitor scrolls down to see them. By not loading all of the content of your long page at once, your site can begin rendering faster. A common plugin used for lazy loading is Lazy Load by WP Rocket.
9. Limit Comments Per Page
While it’s awesome to get so much attention on your blog posts, a ton of comments can also slow page load time down. Breaking the comment section into pages is a good idea to shave off the time it takes for them to load.
To limit the number of comments that appear per page, simply go to Settings -> Discussion and check the “Break comments into pages” box. You can then select the number of comments per page (default is set to 50).
This should help improve memory consumption and boost page load times for posts and pages with tons of comments.
10. Reduce Redirects
Redirects have some uses, but unnecessary redirects, such as 301 redirects and redirect chains, can really slow things down. It’s best to reduce the amount of additional information requests that your server undertakes.
11. Reduce Post Revisions
Post revisions save every content edit you make infinitely, which can make your site run slower. To speed up your site, you can choose to limit the number of revisions per post.
To do so, open the wp-config.php file and add this line of code to limit the number of post revisions:
define( ‘WP_POST_REVISIONS’, 4 );
The number, in this case, denotes four, which means there will be four revisions created per post. You can change this number or even switch revisions off by setting the value to 0 or false.
12. Disable Pingbacks and Trackbacks
While you might have never heard of pingbacks or trackbacks before, they are considered by some to be a legacy feature. Although it’s still a good idea to make sure they are turned off as they can cause slowness when it comes to page speed.
To disable pingbacks and trackbacks, simply go to Settings -> Discussion and make sure “Allow link notifications from other blogs…” is unchecked.
13. Run the Latest Version of PHP
Running the latest version of PHP can have a major effect on the speed of your site. To determine if your site is ready to switch to the latest PHP environment, try using WP Engine’s PHP Compatibility Checker plugin.
Updating to the latest version of PHP on your own is also easy and can be done by going to your WP Engine user portal.
14. Choose a Fast, Lightweight Theme
Not all WordPress themes are created equal—some are written better than others, and a beautiful UI design is meaningless if your site fails to load fast.
Rather than opting for a feature-rich theme (which involves a lot of code that has to be loaded every time someone visits your site), take a minimal approach by using a theme that contains the bare bones of what is necessary to function well.
Of course, you want the theme to look good. Make sure and check out WP Engine’s suite of premium WordPress themes, which are available to customers at no extra charge.
15. Use a CDN
No matter a user’s location, your content should be delivered blazing fast. Sometimes this isn’t always feasible, though—that is, if your site isn’t on an infrastructure that contains data centers in other parts of the world. Distance can mean lag in content delivery, which is where a content delivery network (CDN) becomes handy.
A CDN leads to faster page load times because when configured, your website will use an optimized server that’s closest to your site visitor. The data center will store static content and files, and then deliver them to users based on their location. This can help reduce external HTTP requests because the static content is already ready to go instead of requesting tons of HTTP at once.
Choosing a CDN depends on the popularity and needs of your site. Some WordPress CDN solutions include MaxCDN, Cloudflare, or CacheFly. WP Engine uses Cloudflare’s CDN for our customers.
16. Leverage Browser Caching
It’s also important to ensure your HTTPS headers include an expiration date so the browser knows when to get the resources from the network as if they were new, rather than getting them from their local machine.
At WP Engine, we take care of this piece for you since our servers are already optimized to serve WordPress websites. By default, pages are set to expire every ten minutes, and static resources are set to expire every 365 days.
17. Move to a Dedicated Server
If your site receives a lot of traffic, it’s a wise idea to host it on a dedicated server, where server resources are not shared.
When uptime is crucial, a shared server could be troublesome. Even though shared hosting is affordable, being on the same server as others can lead to clogging of CPU and RAM. It’s like being in an apartment complex and you only have so much water to share—if another site hogs up all the server’s bandwidth, then you are left with a slow running site/server and potential downtime.
To ensure your site has maximum uptime, it’s worth investing in a hosting plan where you receive the full resources of a single server.
18. Consider Your Hosting Infrastructure
The hosting environment you choose can dramatically impact site speed in a positive way. Depending on the server and technology, managed WordPress hosting is necessary for a faster WordPress site.
Sites on WP Engine’s hosting environment have shown an average site speed improvement of 68 percent. Here are just a few of the ways WP Engine helps with site speed:
- EverCache: Our comprehensive multi-tier caching system, EverCache helps serve more cached pages to your end users. When cached, your pages are served in a few milliseconds, compared to a few full seconds when generating the page without cache. EverCache also caches the results of repeated queries to your database for faster performance. These layers combined mean faster performance, and a more lightweight website that can support your site through waves of high traffic.
- Caching: We ban all caching plugins because we do it better. Our WordPress hosting platform provides caching for page, object, CDN management, URL re-writing, and more.
- Sophisticated Infrastructure: All web traffic is handled by our sophisticated front-end system. This proprietary layer is built off of thousands of carefully designed code rules which are continually audited and adjusted for maximum performance and finely tuned for WordPress.
Want a third-party perspective on the pros and cons of using WP Engine? Check out this WP Engine review.