• Hi, Pleskians! We are running a UX testing of our upcoming product intended for server management and monitoring.
    We would like to invite you to have a call with us and have some fun checking our prototype. The agenda is pretty simple - we bring new design and some scenarios that you need to walk through and succeed. We will be watching and taking insights for further development of the design.
    If you would like to participate, please use this link to book a meeting. We will sent the link to the clickable prototype at the meeting.
  • (Plesk for Windows):
    MySQL Connector/ODBC 3.51, 5.1, and 5.3 are no longer shipped with Plesk because they have reached end of life. MariaDB Connector/ODBC 64-bit 3.2.4 is now used instead.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.

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