aws, amazon linux 2,

How to Install PHP Zip on Amazon Linux 2

Feb 01, 2023 · 1 min read · Post a comment

Older PHP versions had support to enable the zip extension by using --enable-zip option. With PHP 7.4.0 and all the upper versions, the bundled libzip extension has been removed. Here I’m gonna show you how to install PHP Zip on Amazon Linux 2.


  • Amazon Linux 2
  • sudo privileges
  • PHP installed

Install PHP Zip on Amazon Linux 2

Step 1. Enable the desired PHP version.

sudo amazon-linux-extras enable php7.4

Step 2. Install php-zip.

sudo yum install php-zip

Step 3. Restart your nginx or apache service depending on your web server.

Step 4. Verify the installation.

echo "<?php phpinfo(); ?>" > /var/www/html/info.php

Step 5. Open the file (info.php) in the browser.



Feel free to leave a comment below and if you find this tutorial useful, follow our official channel on Telegram.