26+ Ways To Speed Up WordPress Websites in 2019
A fast website is the absolute must for your online business. Whether you are a blogger, business owner, or an ecommerce store owner, fast loading websites deliver better user experience, seamless browsing across the website and reduced consumption of resources (particularly RAM and bandwidth).
Why Speed Up Your WordPress Website
Here are three very important reasons why speeding up your WordPress website should be your number one priority:
- Improved user experience for visitors coming from diverse sources.
- Search engines love fast websites and rank them higher in SERP.
- A fast WordPress website naturally has more page views than a bloated website that loads slowly.
The problem is that speeding up WordPress websites is not a simple matter of setting up a few options. Rather, it is a combination of various factors and options that come together in the form of a fast website. In this article, I will highlight 26 ways in which you could speed up a WordPress website.
1. Use a Lightweight WordPress Theme
Every WordPress website has a beginning. In my opinion, once you have decided upon the name of the website, the real starting point is the selection of the theme.
The internet is overflowing with WordPress themes. In fact, the official WordPress Theme Repository has thousand of themes. In addition, dedicated theme websites such as ThemeForest add couple of thousands to the list of WordPress themes.
In this context, selecting the right lightweight theme is not easy. However, if you choosen theme could answer the following questions in affirmative, it is a very good fit for your website:
- Is the theme based on an optimized framework such as Bootstrap, Thesis or Genesis?
- Is the theme minimalistic with little eye candy?
- Is the HTML code optimized?
- Is the size of theme files small?
- Is the WordPress theme free of bloated options that nobody ever uses?
If the answer of any of the above questions is in negative, chances are that the chosen WordPress theme will slow your website to a crawl.
2. Use a Reputable WordPress Hosting Provider
You should take the hosting for your website very seriously. In fact, this is the most important decision you will ever make for your website. A reputable hosting solution for your website will definitely lower the page load time for your website.
So what defines a good WordPress Hosting provider?
There are way too many hosting providers to choose from. Some are very cheap and you may think that they are providing a very lucrative offer with their unlimited bandwidth, unlimited email accounts, unlimited domains etc for just under USD 30 (even less in some cases!)
My recommendation is to stay far away from such hosts, and instead, search for hosts that provide optimized WordPress Hosting. These hosting providers are not cheap, usually cost more and have several usage related restrictions. However, their customer support is exceptional when it comes to solving WordPress speed related issues and their servers are optimized to handle spikes in traffic on WordPress websites.
To further complicate matters, WordPress hosting providers can be categorized into following categories.
- Shared WordPress Hosting Providers
- Dedicated WordPress Hosting Providers
- VPS WordPress Hosting Providers
- Cloud WordPress Hosting Providers
- Managed WordPress Hosting Providers
Shared hosting providers often offer cheap deals that look very good. However, remember that in return for the low prices, you will be sharing your server (IP address) with other websites and the quality of services is not that great. Bluehost, NameCheap and Godaddy are three well known shared hosting providers.
Dedicated hosting plans are expensive and require you to have an expert system administrator on your staff to optimize the servers for WordPress. These hosting solutions are hard to maintain but can usually deliver exceptional performance (if optimized perfectly). Siteground, Godaddy, Nexcess are a few popular dedicated hosting providers.
These days, VPS hosting has become very popular, with DigitalOcean being the most popular. These hosting solutions have high performance, reliability, and scalability. But, you will need an expert to optimize your VPS hosting solution for WordPress.
Cloud hosting offers very high performance and is usually expensive. In fact, many experts consider this to be the most reliable hosting solution of all types of websites. Amazon EC2, Linode, Google Compute Engine are some popular cloud hosting solution providers.
Managed WordPress Hosting is the latest buzzword these days. Thus providers are the hype these days. Thus, there are simply too many providers for managed WordPress hosting solutions. What makes managed WordPress hosting providers unique is that they do all the hard work for you and optimize your server and WordPress websites, so that you can enjoy a good night’s sleep 🙂
3. Use Fewer and Lightweight Plugins
Plugins, plugins everywhere!
What I love about WordPress is the fact that whatever functionality you may think of adding to a WordPress website, chances are that there is already a plugin in the WordPress.org plugin repository that does the trick.
With so many plugins available, WordPress website administrators sometimes get carried away and load the website with all sorts of plugins. However, you should know that the higher the number of plugins, the more will be the page load time of the website.
I strongly recommend that you use as few plugins as possible and always opt for plugins from reputable developers. These plugins are especially optimized for and plugins that have a good reputation. Reputable plugins are known to perform well and have optimized code that really speed up the website..
4. Delete Unused Plugins and Themes
So you did carried away and installed all the plugins you could find. Now if you think that you could deactivate the plugins and speed up your website, you are very wrong! The only solution in this case is to delete all unused plugins and themes from the WordPress website. Deleting unused plugins and themes will reduce the size of the wp-content folder, further improving access time to this folder.
5. Optimize Images Manually or Through a Plugin
Many users think that they could make their websites visually appealing by uploading high resolution images (100kb to 1MB in size). However, these images eat up a lot of time and bandwidth of your visitors.
In many instances, high resolution images make WordPress websites sluggish. To deal with these images, I suggest that you convert the images to a lower resolution and smaller format (JPEG, BMP, GIF).
6. Reduce External Scripts & HTTP Requests
If you check the source code of your WordPress website, you will see some scripts that you could not identify. The best practice in this scenario is to eliminate as many external HTTP requests as possible and host them on the server alongside your website.
External HTTP requests are sometimes slow to respond and in the worst cases, even timeout. That is because external requests are loaded from external servers that you do not control.
7. Use the Latest PHP Version
Using the latest version of PHP (at the moment PHP 7.x) will greatly improve the speed of your website. PHP 7 works wonderfully well with WordPress websites and delivers exceptional performance. Ask your hosting provider whether they have support for PHP 7. This is a must-have upgrade that performs well even on low-end servers.
8. Use a WordPress Caching Plugin
A WordPress caching plugin is a must-have on all your WordPress websites. These plugins help in configuring the following caches on the website: .
- Browser Cache
- Database Cache (more on this later)
- Opcode Cache
- Object Cache
- Server side Cache (Varnish)
- Page caching
Best WordPress Caching Plugins For A Fast Loading Website
1. WP Rocket
2. W3 Total Cache
3. WP Super Cache
To view the full list check out our article on WordPress caching plugins to speed up WordPress.
9. Use a Content Delivery Network (CDN)
Visitors come to your website from all over the world. The problem with this globally distributed traffic is that everybody will have different page load speed.
To ensure near-uniform loading time for all geographical locations, a CDN is the best choice. CDN makes a copy of your website onto servers that are distributed across the world. A website behind a CDN will be served from the nearest server to the visitor’s IP address.
I strongly recommend MaxCDN for your WordPress websites.
10. Optimize the WordPress Database
Overtime, WordPress database will get filled with data that you may not require anymore. WordPress databases store everything including entire blog posts, images, user data, settings, and comments.
I recommend that you clean up the WordPress database after every three months. This will keep your database healthy and free of unwanted garbage that potentially slows down the website. For this, use WP-sweep, a plugin that does its job well without any complications.
11. Reduce Calls to Database & Use Database Cache
There is a high chance that you might end up using a poorly coded WordPress theme that make unnecessarily calls to database, even in situations where a simple HTML code will do well.
This is why it is vital that you evaluate your theme, file by file and replace any unwanted PHP and database calls with simple HTML.
Another way of optimizing databases is to use a caching system that caches all the database requests. Memcached and Redis work wonders and help reduce the load on the database by caching the requests and reducing the time required to serve the most frequent requests.
12. Use a Better Database or Host It Separately
MySQL is probably the most used database by WordPress users and hosting providers. However, several databases such as MariaDB, PostgreSQL are known to perform better than MySQL.
Ask your hosting provider whether they have MariaDB or PostgreSQL, and if they do have the support, I suggest you to move your WordPress database to either of these DBMS.
13. Update the WordPress Core
Updates for the WordPress core are vital for the security of your website. In addition to the security, these updates are also essential for speeding up your website. The performance boost may be too small to be noticeable, but still , I highly recommend that you update the WordPress core as soon as an update is released.
14. Update the Plugins
Similar to the core. It is necessary to keep all the plugins updated at all times. The same logic that applies to the updates for the WordPress core, applies to plugins as well.
15. Update the Themes
If you have purchased a premium theme or downloaded a well maintained theme from the WordPress.org Theme Repository, chances are there will be occasional updates for these themes. The authors of the themes continuously fix bugs and improve the quality of the theme by minifying the theme code.
To update your WordPress website, just login to the WordPress admin panel and under Dashboard >> Updates, you will see all the available updates for the WordPress Core, Plugins and Themes.
16. Limit Posts on the Homepage & Use Excerpts
Some WordPress themes, by default, load entire blog posts on the homepage of the WordPress website.
To make your blog more readable and to reduce the loading time, I recommend reducing the number of blog posts that are displayed on the home page. To limit the number of blog posts, head over to Settings >> Reading in the WordPress Admin and define the number of blog posts you wish to display. I recommend using a number less than 10.
Other than limiting blog posts, it is a good practice to use excerpts of blog posts on the front page. Most themes display excerpts on the front page, when you select Summary in Settings >> Reading, as shown in the above screenshot.
17. Split Comments Into Pages
If your blog becomes popular, chances are that people will start commenting on your blog posts. Sometimes, the conversations span over hundreds of comments. Keeping all the comments on one page will seriously impact the loading time of your website.
The best practice to deal with thousands of comments is to paginate them and load groups of comments on demand. You can easily control this by navigation to Settings >> Discussion and select the Break Comments option as shown in the following image.
18. Paginate Long Form Content
Just like paginating blog comments, it is a good practice to paginate long blog posts that contain more than a thousand words. Many websites use this technique to keep the loading time to a minimum. A side benefit is that content consumption becomes easy because of small servings.
In most themes, you can use <!––nextpage––> in the post editor to paginate the text after the tag to the next page.
If this tag does not work, simply open single.php file in your prefered editor and add <?php wp_link_pages(); ?> in the WP Loop. I recommend checking out the WordPress Codex.
19. Lazy Load Images
Loading all the images at once can put a lot of stress on the server and the browsers of the visitors.
The best method of reducing the load time of your WordPress website is to lazy load images. This concept loads up the images as the visitor is scrolling and viewing a part of the image.
You can easily implement this technique through a Lazy Load plugin.
20. Use Third Party Platforms for Visual Content
Uploading large media files such as images, info-graphics and videos to your WordPress website is generally not a good practice as it adversely increases the size of the uploads folder.
To keep the load off your server, it is better to host the videos and large images at a third party image storage solution provider and embed them in the WordPress posts and pages. This way the video and image rendering is handled by the external servers.
For example, host the videos on Youtube, Wistia or Vimeo and embed them into the WordPress website. The embedded resources load faster and also look nicer. This technique also ensures that you have a backup copy of all the visual content of your website at an external location.
21. Disable Pingbacks & Trackbacks
By default, WordPress enables pingbacks and trackbacks. Through pingbacks, WordPress websites communicate among each other by sending notifications whenever one WordPress website links to other one.
Enabling pingbacks and trackbacks has drawbacks as each notification is a separate request. Thus, If your website receives a lot of trackbacks and pingbacks, it adds to the load time of the website.
To turn off these requests, navigate to Settings >> Reading in the WordPress Admin and uncheck the Allow link notifications from other blogs option as shown in the following image:
22. Limit Post Revisions
By default, WordPress saves the drafts of blog posts and pages as post revisions. Every 60 seconds, a new revision is saved. Just imagine the load on your website in the case of multiple authors working on different blog posts. Each revision save request consumes server resources and increase the load time for the visitors.
23. Disable Hotlinking to Your WordPress Website
Hotlinking is the concept where one website uses the media (images, info-graphics etc.)of another website in its content. Some websites will embed images in their content by making a call to your media files.
Hotlinks will eat into your server resources and it is a good practice to disable hotlinking altogether. You can read a helpful guide from our friends at WPNinjas on how to disable hotlinking.
24. Add an Expires Header to Static Resources
Expires header in your content defines for how long should the visitor’s’ browser retain your content in its cache. This is very helpful for returning visitors to your website because the browser do not have to reload resources on every visit.
You can add expire time in the .htaccess file by defining the following code
ExpiresByType image/gif A2592000
ExpiresByType image/png A2592000
ExpiresByType image/jpg A2592000
ExpiresByType image/jpeg A2592000
The above code tells the visitor’s browser to cache images for a month. You can edit this duration by editing A2592000 (this means 1 month in the future (60*60*24*30=2592000)).
25. Remove Useless Widgets & Social Sharing Buttons
Similar to plugins, people do get carried away all sorts of eye candy, widgets and buttons on WordPress websites. Adding too many widgets and social buttons will add a lot of requests on the frontend and each request means an additional call to the database. The end result of this many requests is a slow loading page. Therefore, It is best to keep the frontend of your theme lightweight and simple.
26. Use AMP Pages
Accelerated Mobile Pages is the new hype in the SEO and web development industry. The AMP pages load in milliseconds on mobile devices and rank higher in Google SERP in searches originating from mobile devices.
If you want higher traffic from mobile users, it is absolutely necessary to configure AMP pages on WordPress. Read our helpful guide on how to configure AMP pages on WordPress websites.
27. Lastly, Use Faster Internet!
After you have implemented all the above 26 steps and your visitors are still complaining that your WordPress website is slow, it is time to ask the all-important question: Is my Internet Fast Enough?
However, the above steps cover all essential aspects of speeding up WordPress websites for your visitors. If you have further questions on how to go about configuring any of the above points, then do leave your questions in the the comments section and I will point you in the right direction.
Subscribe to Get The A FREE WordPress Ebook Right in Your Inbox
WPblog provides the complete guide to launch your WordPress website completely FREE!
Moeez is ‘The’ blogger in charge of WPblog. He loves to interact and learn about WordPress with people in the WordPress community. Outside his work life, Moeez spends time hanging out with his friends, playing Xbox and watching football on the weekends. You can get in touch with him at moeez[at]wpblog.com.