Here is a temporary solution for wordpress users who cannot install plugins, themes or update wp due to ‘Abort class-pclzip.php : Missing zlib extensions’ error. It may work for those who cannot wait till the system is updated with a bug fix.
You need to have your zip files ready to upload manually. The trick is that zlib is working under php 5.6 or earlier.
- Create a free subdomain in your account and set a PHP version to 5.6 for it.
- Create a php script, say unzip_script.php under htdocs of new unzip-subdomain with the following content:
<?php
$zip = new ZipArchive;
$res = $zip->open('my-file-name.zip');
if ($res === TRUE) {
$zip->extractTo('./');
$zip->close();
echo 'File unzipped';
} else {
echo 'Error!';
}
-
For extra security put an empty index.html file to htdocs or modify .htaccess.
-
Using Online File Manager upload your zip file(s) to your unzip-subdomain’s htdocs. Change the filename in php script to your uploaded zip. Run php script in your browser. When unzip process is finished, it reads ‘File unzipped’.
-
With Online File Manager ‘Copy’ the resulting unzipped directory and ‘Paste’ it to the needed place, say ‘wp-content/plugins’ of your domain or subdomain where Php 7.4 is installed.
-
All you need then is to activate new plugin in your wp-admin.
Follow similar procedures in updating themes, or other resources.
Hope this helps…