• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Question How to install Brotli extension for PHP 7.4.x with Ubuntu 20.4.1 LTS ?

Automata

Basic Pleskian
Hi,

Operating system:
Ubuntu 20.04.1 LTS

Plesk version:
Plesk Obsidian v18.0.33_build1800210123.00

PHP version:
7.4

Server type:
NGINX only


I have already googled and tried all the existing guides but unfortunately none seem to work.

So i kindly ask for help on how to install Brotli extension for PHP 7.4.x with Ubuntu 20.4.1 LTS on Plesk Obsidian v18.0.33_build1800210123.00 on NGINX only server.

Brotli extension for PHP is required for web sites developed with WordPress and using the W3TC (W3 Total Cache) plugin which currently has over 1 million active installations on WordPress..

At this link you can find the discussion on the official W3TC (W3 Total Cache) plugin support forum on WordPress.org :

Brotli Compression Installed But Not Available In W3TC

This is the explanation given by one of the developers / support agents of W3TC (W3 Total Cache) plugin for WordPress:

"We check for the PHP function brotli_compress because that function is used to compress cache files and store a compressed version of the cache, the same as we do for gzip compression. If we would not do this, the server has to dynamically compress files when requested, which takes some time. That would defeat the purpose of using compression to speed up the website.
This means that you need to install a PHP module Brotli so that Brotli can be enabled in W3 Total Cache"

So they suggest using this PHP extension which is actively supported and maintained:


https://github.com/kjdev/php-ext-brotli

I would like to thank in advance anyone who wants or can help me now.
 
@Automata you can try to use this method:

Code:
# apt-get install plesk-php74-dev make gcc git
# git clone --recursive --depth=1 https://github.com/kjdev/php-ext-brotli.git
# cd php-ext-brotli
# /opt/plesk/php/7.4/bin/phpize
# ./configure --with-php-config=/opt/plesk/php/7.4/bin/php-config
# make
# cp /root/php-ext-brotli/modules/brotli.so /opt/plesk/php/7.4/lib/php/modules/
# echo "extension=brotli.so" > /opt/plesk/php/7.4/etc/php.d/brotli.ini
# plesk bin php_handler --reread

After that, you can check that brotli PHP module is loaded:

Code:
# /opt/plesk/php/7.4/bin/php -m | grep brotli
brotli
 
Back
Top