Why should Speed Up Your Website?
There are so many important reasons to speed up your site. One is that, google cares about it. If your site is speedy enough your rank will high on search results. So if your site is not speedy enough I will not get new visitors. And another main reason is that, when your existing visitors visits your site if they get it as loading….. loading….. you will lose them soon. These two reason is enough for taking care of your site’s speed up. How to check the website speed? Use the sites to check speed. They are reliable but don’t over trust them. Use the actual devices.
So how to Speed Up?
I said easily. So it will be easily. I will suggest some manual works to ensure the result & also use some plugin. Just follow these steps.
Minify All .CSS & .JS files
Check your .css & .js files on your theme. If they are minified then okay, other wise minify them. There many website who helps to minify the files. Just search them.
And use asynchronous files.
Reduce the HTTP Requests Number
Combine your all .css files to one & all .js files to one. But now you have to be a little careful about that everything on your site is working fine. I will suggest you to do it one by one. Create a new file & put one file & check the site. If any file creates any problem just skip it & call it as a single file. Here you should care the priority of the files.
Optimize the Images
Optimize the images manually. You can use online tools. Tinypng.com is a nice one.
Here one thing, when you test on google page speed insight, they will suggest the optimized images. Be careful to take these images. Google gives the images only for the single page which you are testing. If the images are used on another pages with different sizes it will create the problem. And also sometimes it decrease the quality to too low and sometime doesn’t count the images that could be optimized.
Don’t use a sized image which you don’t need. Change the image size to as you need on webpages & then optimize.
We will use w3 Total Cache plugin. It cares about Gzip compression. But sometimes it may not work. Use the code below the compress the text. Add the snippet to your .htaccess file on Apache server.
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
AddOutputFilterByType DEFLATE application/x-font
AddOutputFilterByType DEFLATE application/x-font-opentype
AddOutputFilterByType DEFLATE application/x-font-otf
AddOutputFilterByType DEFLATE application/x-font-truetype
AddOutputFilterByType DEFLATE application/x-font-ttf
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE font/opentype
AddOutputFilterByType DEFLATE font/otf
AddOutputFilterByType DEFLATE font/ttf
AddOutputFilterByType DEFLATE image/svg+xml
AddOutputFilterByType DEFLATE image/x-icon
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/xml
# Remove browser bugs (only needed for really old browsers)
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0 no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
Header append Vary User-Agent
Or if you are on NGINX add this snippet to nginx.conf :
gzip_disable "MSIE [1-6]\.(?!.*SV1)";
Browser Caching :
Use any good caching plugin. If you are not using w3 Total Cache plugin I will suggest it. It has many features works fine active installation 1+ milion & 26k+ 5 star review. There is an option for Gzip compression.
Lazy Load :
Use a lazy loader plugin. It will decrease the page loading size extremely. How it works? When you will load the page, the it will not load the full page. It will load only the visible part of the screen. When the visitor will scroll down, it will load the the relevant part. You can you BJ Lazy Load plugin.
Use CDN Service :
Content Delivery Network( CDN ) will do a lot work for you. If you need high speed website from all over the world, don’t forget to use CDN service. The site testing tools may show you high speed of your website, but the actual user’s experience can not reflect for all over the world.
The CDN service will serve your content from their different networks across the world. There is a free feature on cloudflare. But the as far I know the recent experience is not so good. So you should choose a premium one. There are many CDN service provider. Just make search & choose the best one which match with your budget.
More Thoughts :
If your main server is too poor, you may need to change it to a better one to speed up your website.
Though I am on a shared hosting & not using the CDN service see my page speed from Canada. My server in on Scottsdale, Arizona, United States.
A comparison with one of the most popular wordpress websites wpbegginer.com :