Have a complaint about speed for our website? Read this article carefully. There are many reasons why the theme runs fast on some sites but slow on some other sites.
This article is for those of you who are probably thinking that your site is so slow. So, it probably needs to be improved. We all know that speed is an important matter for any website. If your site is too slow, your customers won’t visit your site and you will not get a good revenue.
There are many factors affecting WordPress speed. Hence, in this article, we will explore them all and give you some quick solutions to significantly speed up your website. Also, we will look into some misconceptions about website speed optimization.
A. How to test site speed the right way?
This seems to be the easiest question but in fact, it is the most rookie mistake most people have.
Just visiting your website from your computer won’t show you the correct information on how fast or slow your website is.
Then you may think websites GTMetrix or Pingdom will be the correct tools. Wrong again.
Indeed, GTMetrix and Pingdom are the two most popular and trusted site to test your site’s speed. However, just putting your site’s URL to their checkbox isn’t enough to test site speed the right way.
Some of our customers are always worried about speed since their speed on GTMetrix is way to slow.
For example, this speed test give the result of almost 19 seconds and an F overall score
However, if we look closely, the default test region of GTMetrix is in Canada, while most of your hosting providers are Bluehost, A2hosting, Godaddy, etc. and they are based in the US or in Europe.
Additionally, let’s say you are living in the USA and your audiences are also living in the USA. In that sense, a speed test from Canada wouldn’t mean anything. So, the correct test result should be conducted in the USA.
If you login to GT Metrix and change the test region to Dallas, the speed of the website will improve significantly. For example, in this case, 19 seconds reduced to barely 4 seconds.
If we test from San Jose, California, the speed improved to 3.25 seconds.
That’s how LOCATION affects your site’s speed. Remember to always choose a hosting location that’s nearby your audiences.
In another test, Bostjan Gartnar is based in Europe and he once complained about his site’s speed on GTMetrix is about 3.5 seconds. However, just like the above situation, GTMetrix’s default location is in Canada, and Bostjan audiences are not living in Canada.
Let’s try Pingdom for this. Let’s conduct the test again for people in Sweden, the site’s speed is reduced to only around 600 milisecond
The lesson is to not trust the test site before considering location factor.
What if your site serves Global audiences? Does it mean that your server has to be so fast that it can serve any people anywhere in the world in less than a few seconds? Not necessarily. You just need a CDN – Content Delivery System, which hosts your site’s content in many areas around the world.
This is a complex technology and if you intend to Go Global, your tech team will definitely know how to deploy CDN for your server. One of our suggestion regarding CDN is that you can try with Cloudflare.
B. What’s next? How to Improve Website Speed? Try these:
1. Optimize your Code
Even though the server is quite strong compared to some lines of codes, you still need to bear that in mind. Code Optimization is one of the most important things concerning improving a website’s speed. However, powerful the server is, a website that runs ten thousand lines of code with hundreds of loops for any request will always be slower than a medium size server that only runs less than a thousand lines of code and some loops.
For our high-quality premium themes on ThemeForest, we try our best to optimize code and remove unnecessary files so your site will be in the best performance with our theme. In fact, most of our WordPress themes got Grade A when checking on Pingdom and GTMetrix.
Most of them also get less than 1 second load time. Using the following themes with the latest update can significantly help to optimize your site and your theme’s code, resulting in much better site performance. These themes are using the latest theme making technique of ThimPress – ThimCore:
Eduma | Premium LMS & Online Education WordPress Theme
Eduma or Education WP, currently is the best-selling Education WordPress Theme on ThemeForest and its quality is just off-the-records with regular updates, enthusiast support, and high-quality features, designs about Education.
Magazine WordPress Theme – Magie
LuxStay | Luxury Hotel & BnB WordPress Theme
2. Image Optimization
It is not too much to say that 90 out of 100 sites have this issue: The site’s owner upload images without pre-editing to reduce the size of the image and to make it fit with the area needed.
For example, many people would upload a 5MB portrait picture to the avatar box that only needs a 90×90 px image that needs a maximum of 200kB. That’s a 4.8 MB waste for only an avatar. And there will be more places on your site that need images.
- Remember to always resize your image and always try to make it fit with the position it is intended for.
You can use Photoshop, choose to Save for The Web and customize the dimension, the number of colors to optimize images.
- You can also use a WordPress Image Optimization plugin like WP Smush to increase your speed of the website. WP Smush will automatically optimize your images every time your upload an image to your website.
Currently, it is one of the most well-known plugins for image optimization.
- You can also use Regenerate Thumbnails to regenerate many different Image sizes for your website. For example, if you use Regenerate Image, the above 5MB avatar would be turned into many different versions. In addition, there will be a version intended only for an avatar with 90×90 px.
- Finally, if your site needs a lot of images, you can use Lazy load to only load your site’s structure and text first. Then only load Images when you scroll to the image. So that the loading process will be devided into many phases and Heavy Images will only be loaded upon demands.
3. Use Caching plugins
One of the best plugin for Caching is W3 Total Cache
Here is a W3 Total Cache config that Bostjan found that helped improving his site’s speed to only less than a second.
Below are some other Caching plugins that you can try:
- Swift Performance – WordPress Cache & Performance Booster
This is a relatively new premium Caching plugin that can help you boost your site’s performance swiftly.
That is to say, WP Rocket is a premium WordPress caching plugin with three payment plans offered. You technically only have to pay for a one-time fee, but the support and updates are included if you keep the payments going every year. That said, caching for one website is listed at $39, with support for three websites at $99 and unlimited websites for $199.
Although you can find other free plugins, these are quality rates for one of the most feature-packed caching plugins on the market. There is no free trial or free version of the plugin, but the developers do offer a 14-day money-back guarantee.
One of the reasons we like the WP Rocket plugin so much is because of its simple user interface and quick setup. It’s a WordPress caching plugin with the power to make your site blazing fast, but any beginner could sit down and understand most of the settings involved.
4. Removing unused Plugins.
Check your site thoroughly and deactivate plugins that you are not using is not a bad idea.
When using WordPress, you will be prompted to install many free plugins. However, you wouldn’t be using most of them and these plugins will be taking up spacious spaces on your website. Meanwhile, for any requests from the visitors, the WordPress core engine would still need to deploy them, leading to unnecessarily wasting resources that could be used to speed up your website.
Also, there are plugins that you may use occasionally and it may slow your site down significantly. In this case, you can find plugins that are harming your site and decide to keep or deactivate them by using P3 Profiler.
P3 Profiler will help you find slow plugins and report the performance of each plugin so you know which one to keep and which one to delete.
5. Server Optimization
One last tip on WordPress site speed optimization is on Server Optimization. This may be quite advanced and you only have to worry about this when you are using a VPS instead of a Shared hosting plan since there may be wrong configurations in your server if you are managing it alone. Since we said about the location before, we would not mention it again. However, in Server optimization, there are still some other things you can do to optimize your website especially if you are running:
- Use EasyEngine
The best thing about Easy Engine is that it helps a lot with caching options and HHVM & Page Speed support.
- Nginx Optimization
This is an advanced technique, so I will just list some of the most comprehensive tutorials from Linode and DigitalOcean:
How To Optimize Nginx Configuration
How to Configure Nginx for Optimized Performance
NGINX: making your servers fly
NGINX Tuning For Best Performance
6. Use PHP 7 to significantly speed up your website
Currently, PHP 7.0 is the latest PHP version and it is quite stable since it has been released for almost 2 years.
WordPress.ORG also recommends its users to use PHP 7. Currently, there’s only 9 out of 100 WordPress users using PHP7. Just contact your hosting provider and ask them to change from PHP 5 to PHP 7. Currently, PHP 5 is still the default PHP version in many hosting services.
Below is the Speed test table of the Eduma – Education WP theme for a no configurated, no Cache server with PHP 5.6.28 and one using PHP 7.0.18
Apparently, PHP 7 are always faster and its average load time is only less than 1.5 seconds for Eduma using PHP 7 while PHP5 needs roughly 5 seconds to fully load the site.
Read more How Web Hosting Affects Site Speed