There is an error with the WordPress plugin zlib.output_compression: it is not on

Hello,
After installing Wordpress Matomo plugin yesterday, I haven’t received a report. According to the diagnostics tab, I have the following error:
The zlib.output_compression function is off in the WordPress plugin
What can I do to fix it?
Thanks a lot

Here is URL.

Hi @philips_william

This displayed value come from the method ini_get.
Your php configuration might be good, but you may have a plugin which update your zlib compression

Can you please look into this further.

The message is misleading.

Does matomo need zlib on ON or OFF?

Has you can see in the attached image, one message states “zlib.output_compression is off” as it was the error and in description column it states “You need to set “zlib.output_compression” in your php.ini to “Off”.” …

I checked out my php info and zlib is installed and active as well as zlib output compression.

  1. Check if zlib is enabled in your PHP configuration:

    • Create a new PHP file (e.g., info.php) and add the following code:
      <?php
      phpinfo();
      
    • Upload this file to your WordPress installation directory.
    • Access the file in your web browser (e.g., http://your-domain.com/info.php).
    • Search for “zlib” in the PHP info page and check if zlib is enabled. If it’s not enabled, you may need to contact your hosting provider to enable it for you.
  2. If zlib is enabled, but you’re still experiencing the issue, you can try the following solutions:

    • Solution 1: Edit your wp-config.php file:

      • Connect to your WordPress installation using FTP or a file manager.
      • Locate the wp-config.php file in the root directory of your WordPress installation.
      • Add the following line of code at the top of the file, just after the opening <?php tag:
        ini_set('zlib.output_compression', 1);
        
      • Save the file and upload it back to the server.
      • Check if the error is resolved and if you start receiving reports in Matomo.
    • Solution 2: Edit your PHP configuration file (php.ini):

      • Connect to your hosting server using FTP or a file manager.
      • Locate the php.ini file. It is typically located in the root directory of your PHP installation or in your website’s root directory.
      • Open the php.ini file and search for the following line:
        zlib.output_compression = Off
        
      • Change Off to On:
        zlib.output_compression = On
        
      • Save the changes to the php.ini file.
      • Restart your web server (or PHP service) for the changes to take effect.
      • Check if the error is resolved and if you start receiving reports in Matomo.

If none of the above solutions work, it is recommended to reach out to the support forums or documentation of the Matomo plugin or consult with your hosting provider for further assistance.

@findavid12 Thank you for providing your insight.

@philips_william, @Bear, please review findavid12’s feedback and let us know if this sort out the issue.