Looking to speed up website load time? After spending days making your site get better results using GTMetrix and Google’s PageSpeed tests, you may have seen requests to compress your site.
If you’re on a VPS or Dedicated server you can go beyond just doing the gzip / mod_deflate compression on your sites. This guide will be walking you through how to install the Brotli Compression on your WHM.
Before you begin the install process, complete a backup of your account so recovery can be made if needed. Also, your site will be shut down Brotli is being added. Consider enabling maintenance mode before starting the process.
- Is Brotli Compression already installed on your server?
- Install Brotli Compression via EA4
- Install Brotli Compression via SSH
- Check Your Installation
- Configure your Brotli Installation
Is Brotli Compression on CentOS already installed on your server?
If you have switched to our build of NGINX on your server, you may already have Brotli installed on it. KeyCDN has a tool that will let you know if it’s installed on your server already.
Visit https://tools.keycdn.com/brotli-test and give it one of the URLs on your server.
If its already installed, the tool should reply back with something like the following:
If it’s not already installed you will see the following:
Install Brotli Compression via EasyApache 4
To install the Brotli Compression using EasyApache 4 you would just need to do the following steps:
- Log into WHM as root
- Choose Software >> EasyApache 4
- Click on Customize in the “Currently Installed Packages”
- Choose Apache Modules
- Search for mod_brotli and set it to Install
- Then click on Review
- Click on Provision
After its done Provisioning, you can verify its installed by checking again with https://tools.keycdn.com/brotli-test
Install Brotli Compression via SSH
If you would rather SSH into your server, instead of using EasyApache 4, then you will need to:
- SSH into your server as root
yum install ea-apache24-mod_brotli
Is this ok [y/d/N]:”
While installing it this way it will show recent Log Messages, this can be ignored as long as at the end it shows something like:
Check Your Installation
If after installing Brotli Compression on CentOS the site still fails the test, make sure the domain has an SSL installed.
Refer to our Guide to SSLs and AutoSSLs or contact us via Chat / Phone to have an SSL installed for you.
Configuring Brotli Compression
There are no configuration options in cPanel or WHM for what the Brotli Compression will process. However if you’re an advanced user you can modify what it compresses by modifying the file /etc/apache2/conf.d/brotli.conf.
Congratulations! You now know how to install, check and configure Brotli Compression on CentOS using WHM. Check out our article if you want to learn more about the Brotli Compression Algorithm.
Get better performance and security with our VPS Hosting.#news