You can enable gzip compression with cache plugin like W3 Total cache and for that you have to follow below steps in cpanel:
- Login to cpanel.
- Click on “File manager” Under Files section.
- Here you will find settings option in upper right corner in screen, you have to click on it and then check the box “Show Hidden Files”.
- Click on “Go”.
- Find the .htaccess file and add below code and if you are not able to .htaccess file you can create it.
- Save your changes.