I need some help. I have enabled gzip compression, but I also want to allow brotli compression on my server. I followed many articles available on Google, but none of them helped me to install and enable **brotli.

Did not work:-

I followed all the articled by the digital ocean to install my LEMP stack and WordPress:-

I think there is no working tutorial available for brotli. I also checked the official doc of Nginx, but there is not enough information. I followed their doc to install brotli, but that did not work for me.

If anyone here can tell me the best and clean method to enable brotli. I will appreciate that.


You will need to compile Brotli from source. And you're right. There's almost no documentation on how to do this. I did this for my own server and I'm now running Brotli. :-)

You will need to either compile NGINX with Brotli, or compile a Brotli dynamic module and add to an already-built NGINX.

Here's the script I documented for the second choice: https://www.majlovesreg.one/adding-brotli-to-a-built-nginx-instance

Hope this helps you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.