Are you looking to speed up the WordPress site?
A fast site means a good user experience, less bounce rate, high rankings, and, undoubtedly better conversions. Having a fast-loading website now is not an option, but a necessity.
Look at some stats:
Slow pages affect the traffic and conversion. Both are the lifeline of any business website.
Overall, if you want to get more sales, or traffic, or subscribers, you have to make your WordPress site load faster.
Read More: Core Web Vitals Optimization for WordPress
Every site requires Different Optimization
Every site is different.
Not all the optimization are for all type of the site.
If your site is for downloading wallpapers, you do not want to reduce the quality of images for the sake of speed. You have to find another way to fasten up the site, like getting better hosting.
Similarly, if you have a site that displays the price comparison of a product, it means it requires lots of third-party API connections. You cannot reduce the number of external scripts, but you can reduce the page size by optimizing the other elements.
So, speed optimization also depends on the type of site.
What makes the WordPress Site Slow?
WordPress powers nearly 35% of the web. It is a high number for any CMS platform.
To cater to such a large market, there are thousands of themes, plugins, open-source coding that are available in the WordPress ecosystem. Not all the sites require all the free resources available, but still, there are so many to confuse a beginner or general WordPress user.
Hence, the website owner follows the general route of configuring WordPress, instead of customizing it according to the niche.
That leads to many other site issues, and most important: Speed.
However, the primary causes of WordPress sites are:
Web Hosting: The hosting is not configured correctly for the WordPress platform, or the servers are built on outdated stacks result in the slow loading site.
WordPress Configuration: Not configuring WordPress properly is another thing that most of the user fails to do. Hence, the site loads slowly and even crash sometimes.
Page Size: Large page size due to unoptimized and unscaled images, CSS, and JS. Bad Plugins: Free plugins that are coded poorly, and becomes a bottleneck in the loading of the webpage.
These are the few reasons.
WordPress Site Speed Test
You have to take the speed test to know all the reasons for the slow loading speed of the website.
Use any of the free tools:
- GTmetrix Speed Test
- Pingdom Speed Tool
- PageSpeed Insight Tools
- WebPagetest
Let’s take an example test of a site on GTmetrix.
This tool gives a lot to work on.
You can read our detailed guide on how to run a GTmetrix speed test properly and improve the WordPress site’s speed.
Now, let’s see a few general optimizations to speed up WordPress.
15 Speed Up WordPress Optimization Tips
- Better Web Hosting
- Server close to the Visitors
- DNS Lookup
- Dedicated IP Address
- Lightweight WordPress Themes
- Reduce image sizes/Image optimization
- Minify JS, CSS and HTML files
- Utilize Caching
- Use a CDN
- Enable GZIP compression
- Cleanup WordPress database
- Deactivate or Uninstall Plugins
- Minimum use of External Scripts
- Optimize with Mobile-First in Mind
- Pingbacks and Trackbacks
#1 Better Web Hosting
WordPress is a free platform that requires hosting to store all the data and content. WordPress hosting provides that. You buy a WordPress hosting and then store all the data of your site such as database, images, content, text, videos, etc., on their servers.
A hosting company makes it easier and affordable for you to host data, as buying physical servers is expensive, and hosting locally is not feasible.
There are many types of hosting Web hosting companies provide.
Shared Hosting: In it, companies sell cheap hosting to beginner users. They can sell cheap hosting by dividing a single server into multiple hosting accounts. This leads to the slow loading speed of the site. And as the traffic will grow, you will encounter more and more issues with your hosting. The support is never reliable as they have so many customers because of the cheap hosting.
Read: Dedicated Hosting vs Shared Hosting
Virtual Private Server: A virtual server is a virtual machine that caters to the individual needs of a user, despite installed on the same physical machine. It is better than shared hosting, but there are security issues with setting up the VPS.
Cloud Hosting: With cloud hosting, you get negligible downtime and much better speed. But you don’t get root access to your web hosting, and the cost could go much higher. If you are not a technical person, cloud hosting could do more harm to your site.
Read: Cloud vs Dedicated vs Shared Hosting
Dedicated Hosting: In Dedicated hosting, you get the entire server to yourself. It is much more flexible, secure, and fast than the other type of hosting. However, it is costly to host an entire server for a single person.
Also Read: Benefit of Dedicated Server Hosting
Managed WordPress Hosting:
In managed web hosting, the Web hosting company is responsible for all the hosting related issues.
Such hosts manage all the back-end tasks related to servers and provide support. Managed Web hosting companies optimize the hosting environment for the WordPress platform so the WordPress site can work at its full potential.
With one-click staging and updated technological architecture, automatic backups, and many other benefits, managed web hosting is an attractive option for WordPress site owners.
ServerGuy offers the managed WordPress hosting, with a guaranteed less than 3 seconds load time.
You can read our guide on hosts to choose web hosting.
However, if you are using WordPress for professional blogging or setting up a business site, you must not compromise with the quality. A managed WordPress hosting by ServerGuy is the best option to speed up WordPress site, and overall performance.
#2 Server close to the Visitors
The location of your web hosting is vital for the fast loading of the WordPress site.
Network Latency and TTFB are the two most important factors that depend on the location of the server.
Network Latency: It takes time for a data packet to reach point B from point A. These delays are directly proportional to the distance between the two points. The network latency must be low so that the WordPress site could load fast.
TTFB: Time to First Byte is the time taken to load the first byte of data to the browser. The browser sends the request for some data, and the server responds. The time it takes to receive the first byte of data is TTFB.
Read the in-depth guide to the TTFB. and learn how to effectively reduce server response time.
To speed up your WordPress site, you need to keep these two low. The best way to do this is to keep the server close to the visitors.
Also Read: Mistake while buying Dedicated Server
This is the three steps process:
- Find the location of your visitors.
- Check the revenue
- Find the server
Location of your visitors: You can quickly find the Geo-location of most of your visitors from Google Analytics.
You can find this under “Audience → Geo → Location.”
Check the revenue: If you are running an online store, you should focus on the sales instead of the traffic.
Look for the eCommerce data and find what locations are more profitable to the store.
This is only possible if you have set up the goals in Google analytics. Else, you can check the eCommerce platform data or the delivery data.
Find the server: Finally, find the hosting that has servers at your selected location.
ServerGuy has servers worldwide, and we can reduce your latency and TTFB problems with our advanced CDN programs.
#3 DNS Lookup
DNS is short for Domain Name System.
DNS is the link between the domain name and the webserver. The domain name we remember, like “serverguy.com” or “breeze.com“, they are the human-friendly cloaks for complicated IP addresses — 104.255.220.26
You can find IP address of any domain.
Domain Name Server connects the human-friendly term to the address that the computer can recognize.
You can get both free and premium DNS. Premium DNS is faster than the free one.
Faster DNS lookup leads to the fast loading speed of the WordPress site. If your site is getting lots of hits simultaneously, then you must get the premium DNS.
Learn how to reduce DNS lookup time.
#4 Dedicated IP Address
A dedicated IP address means that only one hosting is connected to the IP address. A dedicated IP address improves the speed of the site, along with security and privacy.
The DNS map the domain name to the IP address, and if you are using the shared IP address, the DNS lookup will increase.
The process when five domains make requests to one IP address is much slower than the one domain requesting the one IP address.
With the premium DNS and dedicated IP address, the initial loading could improve a lot.
#5 Lightweight WordPress Themes
WordPress themes are one of the pros of the WordPress platform. There is so many pretty-looking free WordPress themes for every niche.
However, most of the time, these free themes are the result of unoptimized code put together. Often, developers copy the code from any other theme, make few changes to the core files, and publish it as a new theme.
This is not unethical, as many WordPress themes come under the GNU License.
But the garbage code hurt the speed of the site a lot.
All the elements, sliders, widgets, social icons, etc., free themes do not give functions to turn them off. As a result, they affect the overall loading speed of the site.
It will not be productive to go tweaking all of them manually. The best option is to go with the lightweight theme that gives you only the necessary features.
#6 Reduce image sizes/Image optimization
Images are an essential part of each web page of every website. You can make pages without ages, but then it will be a massive wall of text, boring and dull.
To keep the visitors on the site, one has to bring multimedia to the content.
And images are the most used media on the Internet, after the text. According to HTTP, pictures make up on average of 34% of a total webpage’s weight.
So you must reduce the image sizes. That means optimizing the images before uploading them to the WordPress site.
There are many WordPress plugins to optimize the images:
- WP Smush
- ShortPixel Image Optimizer
- Compress JPEG & PNG images
- Imagify
When uploading an image, you have to find a balance between the quality of the image and its size.
Lazy Load:
Lazy Load is the technique to load only those images of the web page visible to the visitor. As the user scrolls down, the pages load the images below as they become apparent.
You can implement a lazy load in few clicks to speed up WordPress.
This can be done via the WordPress plugin:
- BJ Lazy Load
- Lazy Load XT
- a3 Lazy Load
- Lazy Load
#7 Minify JS, CSS and HTML files
Code minification means minimizing the code and markup on the web page and files. Minimizing the code reduces the load time as well as the bandwidth usage. Once you minimize the coding, you will see that your site is loading quite faster than before.
But what minification do?
As you see, the golden rule of coding is to make it readable. That’s why there is so much white space, and gaps are present in the coding. Having a readable code during the development phase is a good thing, but not having a minified code affects the site speed after the deployment.
The browser and the web server can compile the code without all the comments and white space, so it is better to remove them.
Look at this:
/* Layout helpers
----------------------------------*/
.ui-helper-hidden {
display: none;
}
.ui-helper-hidden-accessible {
border: 0;
clip: rect(0 0 0 0);
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute;
width: 1px;
}
This is an example of code.
After minification, it will look like this:
.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}
The 10 line code converts into a single line of code.
This method reduces the size of the file. Hence, data transfer becomes faster. The light data packages move more quickly than heavy ones.
Generally, minifying a web page can reduce the page size by up to 40%.
A developer can manually minify the code with the help of online tools. Or you can use a WordPress plugin such as Autoptimize.
However, most of the popular caching plugins do have the function of enabling minification.
Learn how to minify Java, HTML, and CSS.
#8 Utilize Caching
Caching is the most effective and easiest method to speed up the WordPress site. It is a standard web practice followed by the web owners, so you must enable the caching on your website.
What is caching?
The DNS connects the domain name to the IP address whenever the visitor clicks on an URL or puts a domain to the web address. After the connection, the HTTP request begins with the queries the visitors have asked for.
The web server looks for the resources that have been asked in the request. Then the files are sent back to the browser in the response.
It is a simple request-response model. Where the browser request the resources from the server, and the server responds with the requested files.
Now, many elements on the page do not require fetching every time because they are the same on every page like widgets, headers, footers, menus, etc.
Caching means storing some of the content on a browser or RAM, so the browser does not have to load each element of the web page from the server.
This saves time and reduces the size of the file.
When the browser makes a request, the browser looks in the cache if the file has been served in the past. The browser will load the data from the cache memory instead of the server if there is a copy of the data in the cache files. Hence, making the process quicker.
Read More: What are E-tags?
You can enable cache in two ways:
- Caching at the Server-Level
- Caching with a Plugin
Caching at the Server-Level:
The hosting provider does Server-Level caching. This means you don’t have to worry even a little bit about it.
ServerGuy has its way to configure server-side caching.
Caching with a Plugin:
If your host is not providing server-side caching, you must implement browser caching.
Learn: Best Caching Plugins.
There are many plugins, both premium and free:
- W3 Total Cache
- WP Rocket
- WP-Cache
Combining the utility of these plugins with advance caching such as Varnish can significantly improve the speed of the site.
#9 Use a CDN
CDN or Content Delivery Network is a network of servers located around the globe. Once CDN is installed, they made copies and distributed them to the network.
CDN works as the server to host your files at the location near to the visitor. The CDN delivers the requested resources instead of the hosting server.
Surely, not all the files are delivered from the CDN network, but as much data as possible.
Overall, once implemented, CDN speed up the WordPress site.
For example:
You have to host in the USA. All the visitors from the USA, so it is wise to have servers in the USA. But someone opens the site from Japan.
Now there are two options:
- Without CDN, the browser will load the resources from the USA server.
- With CDN, the browser will load the resources from the nearest CDN network.
There are many CDN, both free and paid. With ServerGuy WordPress hosting, you get the premium CDN at no cost.
You can use these CDN if your host is not providing you any:
- CloudFlare
- KeyCDN
- CDN77
Also Read: CloudFlare Alternative for a CDN
#10 Enable GZIP compression
GZIP compression is a way to reduce the size of the file by compressing the bits.
It is a server-side setting, which means the web hosting provider must do it. If for some reason, GZIP compression is not enabled on your WordPress site, you must turn it on.
You can use the Autoptimize plugin to enable GZIP compression.
Or you can do it manually by adding a little code to the site.
Enable compression on Apache webservers:
Paste this code into your .htaccess file
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
Enable compression on NGINX webservers:
Add this code to the config file:
gzip on;
gzip_comp_level 2;
gzip_http_version 1.0;
gzip_proxied any;
gzip_min_length 1100;
gzip_buffers 16 8k;
gzip_types text/plain text/html text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript;
# Disable for IE < 6 because there are some known problems
gzip_disable "MSIE [1-6].(?!.*SV1)";
# Add a vary header for downstream proxies to avoid sending cached gzipped files to IE6
gzip_vary on;
Test your compression with speed test tools, and if nothing works, contact your hosting provider.
#11 Cleanup WordPress database
WordPress database is like a cabinet where all the data is stored. All the contents, including posts, post revisions, pages, images, spam comments, settings, etc.
If you are using WordPress for some time, it means there is too much content on your site that you don’t need.
I mean, how many plugins you have installed and then deleted. But the setting of those plugins is still there, taking space.
Deleting all the outdated and unnecessary content will not have a direct impact on the loading speed of the WordPress site. However, by cleaning the database, the server has to search for the less file to find the requested data.
Looking for the data in a clean database is much faster than finding the file in a cluttered database.
You can clean the database manually from phpMyAdmin.
Plugins you can use:
- WP-Sweep
- WP-Optimize
- WP Rocket
#12 Deactivate or Uninstall Plugins
Keeping plugins that you don’t use or don’t need is an additional load on your WordPress site.
The problem is not with the number of plugins, it’s the garbage coding of the free plugins that hurt the site.
If the plugin is optimized correctly, then it will improve the performance of the site.
But most of the time, plugins are not of good quality, and they increase the size of the backup and put an overwhelming load on the server resources during the backup.
The best way is to learn the necessary coding and do the things manually that can be done manually.
Again, if you are going to uninstall a plugin, you have to delete it correctly from the site. Even after uninstalling, the plugins leave the setting and configuration file behind, that stay in the database.
That’s why you should also keep cleaning the WordPress database.
#13 Minimum use of External Scripts
External Scripts enhance the functionality of the site, but they also increase the website’s loading speed.
Third-Party scripts example that affects the site:
- Social media platforms like Twitter, Facebook, and Instagram
- 3rd-party advertising networks
- Website analytics and tracking scripts
- A/B testing tools
- Backup and security tools
- Social sharing tools etc
Java files and CSS files do not load until the other components of the file are completely loaded. This is called Render Blocking Resources. And as the JS and CSS are typically located in the header, they delayed the loading of the other elements of the page.
And the caching does not work on the external scripts. Nor the premium DNS.
Because these external scripts load at their speed, you cannot do much to improve the loading speed.
That’s why you should use the trusted third-party app on your site.
Another solution is to combine the third-party JS files in WordPress and make them a single file. Then deleting the rest. Due to this, the combined JS will work like any other standard file.
Learn how to defer parsing of JavaScript.
You can do this via Autoptimize Plugin.
#14 Optimize with Mobile-First in Mind
Google rolled out the mobile-first indexing in March 2018. This means Google crawlers will look for the mobile version first to rank the content on Google.
Search engines are pushing the site owners to optimize the content for the mobile.
Speed is a crucial factor for mobile users. When one is using the internet on the desktop or laptop, they typically have WiFi or a good connection. That is not the case with mobile users.
The network of mobile users fluctuates, and the patience of smartphone users is much low. According to a report, 53% of mobile site visitors leave pages that take longer than 3 seconds.
Among all the ranking factors, speed plays a significant role in ranking when it comes to mobile.
So first of all, look for how much traffic is you are getting from mobile visitors.
Check this in Google Analytics under “Audience → Mobile → Overview.”
You must make sure that your site is responsive. It means that your site can scale to the size of the smartphone display to give the users a better online experience.
You can check responsiveness by the Google Mobile Checker Tool.
If your site in the niches that work okay with the AMP optimization, then you must take advantage of it. In simpler terms, AMP (Accelerated Mobile Pages) convert the web pages into lightweight content, devoid of all JS and CSS that makes the page bulky.
Most news sites and entertainment sites are utilizing this technique.
Check your site speed on mobile with the Google tool and optimize the site for the mobile.
#15 Pingbacks and Trackbacks
Pingbacks and Tracks are inbuilt WordPress elements that notify you when someone mentions your site or web page somewhere on the internet.
As impressive as it is, but other tools are much better than Pingbacks and Trackbacks. Backlink tools such as Ahref, Ubersuggest, and Semrush can perform this task without putting a load on the site.
Keeping pingbacks and trackbacks means collection all the link mentions and making the web page heavy for absolutely no reason.
Turn them off from the WP-Admin-Settings-Discussion.
Deselect the “Allow link notification” option.
Conclusion
The blind approach will not work to speed up the WordPress sites. You have to make a plan, simple, but still a strategy.
The plan would go like this:
- Step 1: Run the Speed Test
- Step 2: Note down the reasons your site is loading low
- Step 3: Prioritize the tasks..
- Step 4: Make the changes.
If you keep doing the changes to your site without finding out the root cause, you will never be able to solve the real problems.
And having a fast-loading site is critical for business. It does not matter if the user is on a Mobile phone, smartphone, laptop PC, whether it is the mobile network or the WiFi network, the site has to load fast on every type of device.
The task seems complicated, but it is achievable.
I hope this post helped you in improving the loading speed of your site. If there are any issues or questions, leave them in the comments.