How to increase your WP website speed and make it load faster

in #performance5 years ago (edited)


Do you have some problems with your website speed?

Your website is loading very slow?

You have tested the performance of your website on Google Page Speed, Gtmetrix, Pingdom, WebPage Test and you keep having a bad score?

increase website speed

You would like to improve your performances but you don't know-how.

In this article, I'm going to give you some practical tips to increase your website speed and make it load faster.

[myaccordion label_id="toc" label="Table of contents" open="true"]

[toc title="" title_tag="strong"]

[/myaccordion]

My website speed score


Before presenting you the methods I used to improve the accessibility of my website, here the score I got with some website page speed tester.

Gtmetrix:

A (97%) grade for PageSpeed and B (89%) for YSlow Score

page speed score on gtmetrix

Web page test:

A grade everywhere except static cache and CDN

page speed score on web page test

I guess it's because I'm still using some external javascript files (ex: google analytics, facebook) and didn't move all my theme's scripts to CDN yet.

The tests were performed on my Wordpress' website, and the suggestions in this article will mainly concern Wordpress' websites.

If you are not using the Wordpress Content Management System yet, I strongly recommend you to use it. Wordpress is used by more than 25% of websites in the world.

To make it accessible for everyone, I have enumerated my tips to the easiest to harder ones (those last ones are a little bit technical but should still doable).

So let's make your website blazing fast!
speed
Source: giphy.com

 

1. Choose a good Web hosting provider


speed website host

First, please be aware of the importance to get a good and reliable Web hosting provider.

Because a lot of slow issues (latencies, an overloaded server, low bandwidth...) can come directly from your web hosting server itself.

And generally, when you have already subscribed for several years contract, it will be very difficult to change for another provider...

Try to avoid common shared web hosting (Check the difference between web hosting plans), and take a look in specialized web hosting services instead.

For example, consider choosing providers optimized for Wordpress, specialized for programmers or developers (yes, even if you are not a programmer, it's not a problem).

Here some web hosting recommendations:

2. Reduce the size and compress your images

Secondly, you have to know that what makes websites load slowly are generally the media files like images, icons, videos...

Be sure to reduce the size and compress the weight of each image before uploading them on your server.

Resize images

For example, if you want to show 1024 x 798 sized picture on your blog, don't upload your original file of 5MB with 4032 x 3024 pixels.

Because it will take time for your visitors to fetch those heavy images.

3. Choose an optimized Wordpress theme

Theme wordpress

Wordpress community is very big, you can find a lot of free themes on Wordpress.org, but also some premium themes on marketplaces like ThemeForest or else.

But even if you have a large choice, a lot of themes are not well coded or optimized.

Over the design, your priority should be choosing a true professional optimized Wordpress Theme.

We want something fast, well-coded and Search Engine Optimized friendly.

Here some themes recommendations: Genesis Framework, GeneratePress, OceanWp

4. Use Wordpress cache plugins


One of the more common ways to improve the performance of your website is also to use cache plugins.

Those plugins will compress the code of your website (HTML, CSS, javascript...) and cache certain pages to make them load faster.

Here the 2 main cache plugins that I'm using and recommend:

Note that those plugins will only partially optimize the existent code of your Wordpress theme.

It means that it will not improve it fully (that's why it's important to get a good Wordpress theme).

5. Enable GZIP compression on your server



GZIP is a file format and a software application used for compress or decompress files.

Enable this module will reduce the size of files sent from your server to increase the speed to which they are transferred to the browser.

If most web hosting providers have this module pre-installed, it's always good to ask if it's enabled.

If not, you might have to add it by yourself.

Enable GZIP in Apache server


Backup your current config file and try to add the following lines in your config file (ex: /var/www/html/yourwebsite/.htaccess):

[myaccordion label_id="gzip-apache" label="View the code" open="false"]

[snippet slug=gzip-apache lang=bash]

[/myaccordion]

Enable GZIP in Nginx server


Backup your current config file and add the following lines inside "server{} brackets" of your config file (ex: /etc/nginx/conf.d/yourwebsite.conf):

[myaccordion label_id="gzip-nginx" label="View the code" open="false"]

[snippet slug=gzip-nginx lang=bash]

[/myaccordion]

6. Add Expires headers



Expire headers will tell the browser whether they should cache a file for a certain period or not.

This Leverage Browser Caching will reduce server load and decrease page load time because the visitor will access directly the locally cached file from their browser instead of request it from your webserver.

Generally, web hosting providers have already set expire headers for the most common media files (ex: jpg, gif, png...).

If they are not set, you might have to add it by yourself.

Set Expires headers in Apache server


Backup your current config file and add the following lines in your .htaccess file.

[myaccordion label_id="expire-apache" label="View the code" open="false"]

[snippet slug=expires-headers-apache lang=bash]

[/myaccordion]

Set Expires headers in Nginx server


Backup your current config file and add the following lines inside the "server{} brackets" of your config file.

[myaccordion label_id="expire-Nginx" label="View the code" open="false"]

[snippet slug=expires-headers-nginx lang=bash]

[/myaccordion]

7. Use a Content Delivery Network (CDN)

CDN
Source: Wikipedia

A lot of web entrepreneurs don't talk enough about the importance of Content Delivery Network (CDN).

A Content Delivery Network (CDN) is a group of servers placed in different geographic locations to deliver and relay the content fastly over the internet.

Using this system will speed up your website and help your server to not being overloaded because visitors will fetch directly the content from the nearest CDN instead of your server.

I'm using personally AWS and Cloudflare for as my CDN.

But there are many other good services compatible with Wordpress: Key CDN, Max CDN, CDN77

8. Install some cache modules on your server


If you have your own server like a Virtual Private Server (VPS) you can improve your performances directly from your server!

By installing some native cache modules like OPcache for PHP, Redis for caching your database, PageSpeed Module from Google, etc...

You will certainly need some technical knowledge to set them up but if you are a little bit Geek and like optimization, you should try.

This post contains some affiliate links. An affiliate link means that I may earn a little referral commission if you purchase through my link. It can give you a discount and won’t cost you extra fees. You are totally free to use it or not. Thank you for your understanding and support my blog.


resteem

logo Posted from my blog (Creator in pyjamas), check the original article here : https://www.creatorpjs.com/increase-website-speed.html

Coin Marketplace

STEEM 0.19
TRX 0.15
JST 0.029
BTC 63792.82
ETH 2563.50
USDT 1.00
SBD 2.66