Tutorial to speed up your WordPress website loading time
For a fast WordPress website, the most important factor that one needs to keep in mind is a super fast web hosting provider.
RShosting offers exceptionally fast wordpress hosting on Cloud servers powered with SSD.
Below tutorial is a step by step guide, to enhance your normal wordpress website to blistering fast loading website.
Following guide assumes that you have already installed WordPress for your website. If you wish to install wordpress, you can refer “How to install WordPress” tutorial.
Enable gzip compresssion
Gzip compression will compress images and other contents of your website, to reduce its size. This results in faster page loading time for your website.
To enable gzip compression, please login to your cPanel control panel.
Login to your cPanel -> Software -> Optimize Website
It will give you further options:
Compress All Content
Compress the specified MIME types
Click on “Compress All Content” to enable gzip compression for your entire cPanel account. This will create a .htaccess file outside of your public_html folder under your account, which will compress all content.
Upgrade PHP to latest version
It is always recommended to keep your PHP version up2date to latest possible version as available in your cPanel control panel.
As of now, PHP version 8 is available and offers better performance in terms of speed and php processing at server end. Latest PHP versions also provide more security for your wordpress websites.
To upgrade PHP version for your account, please login to your cPanel control panel -> Software -> Select PHP version
You will see a drop down of all PHP version’s available. It is recommended to configure latest PHP version. We will setup PHP version 8 -> Set as current
You can also select / enable other PHP extensions such as imagick etc as per your requirements.
We will now increase our PHP variable limits such as max_execution_time etc.
You can do so by clicking on “Options” tab which will show you a screen similar to below one:
Listed below are a few recommended values for PHP variable limits, that are usually helpful while working with popular themes such as Divi themes etc.
- max_execution_time = 300
- max_input_time = 120
- memory_limit = 512M
- post_max_size = 256M
- upload_max_size = 256M
Enabling LiteSpeed Cache - LsCache
Caching plays the most important role in accelerating WordPress performance and increasing its page loading time.
We use premium LiteSpeed Web server, which delivers several times faster loading time at server end as compared to traditional Apache servers.
LiteSpeed offer inbuilt caching system called LsCache. LsCache can be installed by logging to your WordPress admin dashboard -> Plugins -> Add New Plugin -> search for LiteSpeed Cache -> Install -> Activate
Once installed, you can now manage your LiteSpeed Cache settings from your WordPress admin dashbord. It offers several options such as css minify, jss minify, html minify etc. All these options need to be tried one-by-one and then immediately checking your WordPress website after clearing your LsCache.
Incorrect settings can break your WordPress css and layout.
With our enhanced LiteSpeed web server, you get the benefit of latest HTTP/3 technology. HTTP/3 is the third and upcoming major version of the Hypertext Transfer Protocol used to exchange information on the World Wide Web, alongside HTTP/1.1 and HTTP/2.
In order to enable HTTP/3, proceed as follows:
- Login to your cPanel control panel -> Files -> File manager. It will open a new tab in your browser.
- Click on “Settings” in top right hand corner -> Show Hidden Files -> Save
Now click on “public_html” in left hand side frame, so that you can browse the contents of this folder in right hand side frame.
You will see a file called .htaccess.
Select the file by clicking on it, and then click on “Edit” link, visible on upper side of file manager.
Add below content to enable http/3 to the topmost line of .htaccess, without disturbing any other .htaccess content :
Above guide will enable http/3 for your website. Once done, you need to click on “Save Changes” button.
You can later verify and cross-check your website to know if http/3 is sucessfully enabled by visiting https://http3check.net/
Enter your domain in above http/3 tool. If http/3 is sucessfully enabled, you will see positive results.
Install Image Optimising plugin
It is recommended to install a good image optimisation plugin so that when you upload images to your WordPress website or blog, they are compressed at the time of upload, which reduces its size and helps in faster loading of website images.
We recommend installing "WebP Converter for Media" plugin which will optimise and convert your images into WebP format. You can download the plugin directly from https://wordpress.org/plugins/webp-converter-for-media/
Enable CDN such as Cloudflare or Quic.cloud.
At RShosting we offer you a choice of Cloudflare CDN or Quic.cloud CDN. You can use either of them.
You have now sucessfully optimised your wordpress website for super fast page load times. You will immediately notice the difference and you can also check with website speed monitoring tools such as Gtmetrix.com or Google Page insights.
If you face any problem, while optimising your wordpress websites or need any assistance, please do not hesitate to contact us. We will be happy to offer WordPress optimisation services without any additional costs.!