Do you want to speed up your WordPress site? Fast-loading pages improve user experience, increases your pageviews, and helps with your WordPress SEO. In this article, we will share the most useful WordPress speed optimization tips to boost WordPress performance and speed up your website.
How to test the loading time of your website?
First things first, you need to analyze the current load time for your website. Keep in mind that this speed may differ from page to page, as it depends on various factors, namely:
- the size of that particular page,
- how many requests it generates,
- whether it is cached or not,
- and lastly, what kind of content (static or dynamic) it hosts.
The homepage of a website is usually used as a benchmark to test the load time. In order to check the speed of a website, the following three tools are used extensively across the web:
- PageSpeed Insights (this doesn’t really report the page loading time, but does highlight the elements that you can tweak to speed up WordPress)
What is Your WordPress Site Types? Static or Dynamic?
Before we dive into WordPress speed optimizations, it’s important first to understand that not all WordPress sites are the same. This is why a lot of users have problems, as you can’t go about tackling every issue the same way. We always give WordPress sites a classification: static or dynamic. So let’s first explore the differences between these two types of sites.
Mostly Static Sites
Static would typically include sites such as blogs, small business sites, lower volume news sites, personal, photography sites, etc. By static, we mean that the data on these WordPress sites is not changing very often (perhaps a couple of times a day). Even most of our Kinsta site would be considered a static website.
This becomes incredibly important as many of the requests can be served directly from the cache on the server at lightning-fast speeds! Don’t worry; we’ll dive into the topic of caching in length further below. This means they will have fewer database calls and not as many resources will be needed to achieve google performance.
Highly Dynamic Sites
On the flip side, we have highly dynamic sites. These include sites such as eCommerce (WooCommerce or Easy Digital Downloads), community, membership, forums (bbPress or BuddyPress) and learning management systems (LMS). By dynamic, we mean that the data on these WordPress sites is frequently changing (server transactions are taking place every few minutes or even every second). This means that not all requests to the server can be served directly from cache and require additional server resources and database queries.
These sites also typically have a large number of concurrent visitors and sessions. On an informational or corporate WordPress site which is mostly static, a visitor might stay for five or 10 minutes until they find what they need (and this is a high number, usually bounce rates are much higher). On dynamic sites, you have the opposite happening. Visitors typically come to the site to engage with something or someone. If they’re going through an online course, it’s not unusual for them to stay for hours.
You can see where this is going. The concurrent visitors connected to your WordPress host adds up fast. To make it worse, you then have a large number of concurrent visitors on top of an “uncacheable content” problem.
Ask Your Cloud Hosting Provider
Before starting to take any actions, it’s recommended to ask your WordPress-managed hosting provider for their product and compatibility with WordPress. They can give you tips and ideas on making your WordPress site faster. This will help you with WordPress Speed Optimization efficiently and save you time. Optimized WordPress hosting is required for better performance of websites.
How can your web host improve your site speed?
When you visit a website, you are accessing files from a computer that is probably a hundred or thousands of miles away from you. That server must complete tasks such as executing code, running database queries, and serving files for your web page to load. The quicker that server completes these tasks, the faster your site loads.
What determines the speed of your server? A dedicated server is quicker because the resources are not shared among other websites, so you get optimum performance any time of the day. A dedicated server can speed up your WordPress site because you get the server all to yourself. You never have to worry about bumping up against the limits of your server.
A bigger server is definitely faster than a smaller one. For example, an 8GM RAM, 50GB SSD hard drive with a 2-core processor will complete those tasks much quicker than a server with fewer resources.
Install an Effective Caching Plugin
One of the most popular methods to increase the speed of your site is using a cache plugin. A caching plugin will store the final view of your site for any future visitors. This means that your WordPress won’t have to generate it for every following person viewing the site. This data can include HTML, JS, and CSS code, images, fonts, and Flash files.
Content Delivery Network Won’t Disappoint You
A CDN (Content Delivery Network) is also another important option for speeding up your WordPress site. WordPress CDN offers better loading times for your website, no matter what kind of site you run.
Look for Inactive Plugins or for Plugins that Don’t Work Properly
Another way to speed up your WordPress site is by verifying if your current plugins are working correctly. Plugins and tools can sometimes cause lag in your website, rendering it slow to load.
To do the tests, you can get another plugin. It’s called the Query Monitor. This plugin is free, and once installed, it will report any performance problems with your website.
If you find plugins that slow down your website, remove them or try to find other performance plugins for your WordPress site.
Also, keeping a large number of active plugins will affect your WordPress site speed.
Compress Media Files
Uploading very large images and videos will significantly slow your WordPress site down. For that reason, another solution to speed up a WordPress site is to compress your media files.
Compress Your WordPress site’s Size
The smaller your website size is, the faster it will load.
GZip compression can reduce the size of your website content by about 70 percent. A website, after being compressed, loads faster due to the reduction in bandwidth.
GZip compression can be done by simply installing and activating the Breeze WordPress cache plugin. It would help you get a good performance grade on website testing tools and speed up your WordPress site.
Check if the Website and the Database are in the Same Data Center
Check if your WordPress site and the database are located in the same data center. Proximity is always important when talking about hosting and servers. Having the website and its database in the same data center makes the process of fetching posts and working with the database easier and smoother, thus optimizing website performance.
To find out the location of your server, ask your hosting providers. Sometimes, companies show their server locations during the signup process too.
Optimize Your WordPress site’s Homepage
Another thing you can do to speed up your WordPress site is to optimize your homepage. Make it look simpler, without clustered content and useless widgets or tools.
Also, don’t show the posts at their full length. You can show only the first paragraph or a specific excerpt from the text. Displaying too many posts on the same page could also cause a longer loading time.
The cleaner your homepage is, the quicker it will load.
Update Update Update
Keep your WordPress updated at all times. Whether it is a plugin or a theme, keep in mind that they always stay up to date. If a new patch is available, try to test each update on a WordPress staging site before applying it on a live site.
Hotlinking is a term used when one website uses another’s resources. For example, if someone has copied an image from your site, once his website is loaded, it loads the image from your website. This means that it is consuming bandwidth and resources from your server.
Use Light Weight Theme
There are many shiny and beautiful themes in the WordPress market. But don’t forget, themes with a lot of dynamic content, widgets, slider, sidebar, etc., can cause your hosting server to respond slowly.
Always optimize your WordPress theme or use a lightweight WordPress theme. The default WordPress themes can be enough if you want to run a blogging website. For more features, you can use themes that are built on Bootstrap and Foundation.
Control Post Revisions
No doubt, post revision is a great feature in WordPress. But, not every feature is feasible for everyone. There are few users with low disk and database space.
Every time you change the content in post revisions, a new copy of the post is saved in the database rather than deleting the previous one. So that you can always have a chance to revert. It increases the database size, and a large size database can cause many problems.
Remove Useless Widgets & Social Sharing Buttons
WordPress users often get carried away when it comes to widgets. Users feel like they should install as many as they can to make their website more functional, not knowing that these widgets come at a cost apart from their price. Widgets tend to bulk up your website, which results in sluggish load times as it generates a significant amount of requests on the front end. Plus, each request means an additional call to the database
In this case, the best solution to speed up your WordPress website is to keep your widgets to a minimum and use just the ones your website really needs. For other functionalities, you can also use codes, a much less resource-intensive way of making your site functional.
Reduce External Scripts & HTTP Requests
By checking the website’s source code, you will come across some scripts that you are not familiar with. The best way to speed up your WordPress websites is to reduce as many external HTTP requests as possible and host them separately.
Optimize the WordPress Database
For WordPress speed optimization, you need to optimize your WordPress database. Like your computer’s hard drive, your WordPress database gets filled with junk you don’t need. An unoptimized WordPress database slows down your website over time. The simple solution for that is to clean it up from time to time.
You can either use a database optimization plugin to clean your WordPress database or manually free up your database from garbage that you don’t need to speed up your WordPress website.
Reduce Calls to Database & Use Database Cache
Many WordPress themes are poorly coded, and there is a high chance that you might be using one that sends unnecessary calls to the database. In this case, it is vital that you replace any unwanted PHP and database calls with simple HTML.
Use a Better Database or Host It Separately
It is vital that you use a reputable database for your WordPress website. MySQL is most commonly used by hosting providers due to its reliability and performance alongside MariaDB and PostgreSQL.
When switching a host, it is important that you research what database they are providing since it is a huge determinant of your site’s speed. Also, if your host has support for MariaDB, I would suggest that you move your database there for better speed.
Adding Google Fonts
WordPress users often use Google Fonts for their websites because of its extensive library and the fact that it is hosted separately on a different server, significantly reducing the server’s load.
While using Google Fonts is a great way to jazz up your website, you should be aware of how to make the most of it to speed up your WordPress website.
First, you need to ensure that you pre-load the Google Fonts to optimize your website for speed. Second, you are always advised to host your Google Fonts locally, which means downloading the fonts file onto your local system. Though this method omits the reliance on a third party when using a font, it also prevents auto-updates, so you will need to update the fonts manually. Lastly, use as few font variants as possible because the more font variants you use, the longer it takes for them to download.
Comments are a common feature, especially for WordPress blogs. If it’s a popular one, chances are that your comment section will comprise hundreds of comments that will require resources in order to load.
Paginating comments is a good practice to speed up your WordPress site. It allows users to load comments on demand, so only those who are interested in the comment section will be able to see it. You can accomplish this by navigating to Settings > Discussions.
Paginate Long-Form Content
Aside from paginating comments, you can also paginate long-form content to shorten the page length to load it quickly. Another benefit of breaking down your content into pages is that it improves readability and makes it easier to consume.
Most themes can paginate content from the backend, but if you can’t find it, just open the single.php file in your editor and add <?php wp_link_pages(); ?> in the WP loop.
Lazy Load Images
Lazy loading is an age-old technique for WordPress speed optimization, where the images are loaded as the user scrolls down the page. The idea is to not load all the page elements at once as it stresses the server, resulting in slower load times. Rather it loads images as and when the user reaches the part of the page where the image is placed.
There are a number of lazy load plugins that you can use to implement this technique.
Use Third Party Platforms for Visual Content
While videos are a good way to engage your audience, they do tend to take up a significant amount of server resources to load. In this case, the best way to speed up your WordPress website is to host your videos separately on video hosting services such as YouTube or Vimeo.
You can upload the videos on YouTube or Vimeo and use the embed code to add them to your page. This way, your videos won’t use your server to load and will free up resources for other elements.