Hello, web developers! In this article, we'll see how to install the php-zip extension in Ubuntu 24.04. Here, we'll enable the PHP zip extension in Ubuntu 24.04. This extension enables you to transparently read or write ZIP compressed archives.
The php-zip extension provides a convenient way to work with ZIP archives in PHP. With this extension, you can easily create, extract, and manipulate ZIP files, making it a valuable addition to your PHP development environment.
Ubuntu 24.04 Install php-zip Extension
Open a terminal window and run the following command to update the package lists.
sudo apt update
Once the package lists are updated, you can proceed to install the php-zip extension by running the following command.
sudo apt-get install php-zip
PHP 8.3
Run the following command to install php-zip for PHP 8.3.
sudo apt-get install php8.3-zip
PHP 8.2
Run the following command to install php-zip for PHP 8.2.
sudo apt-get install php8.2-zip
PHP 8.1
Run the following command to install php-zip for PHP 8.1.
sudo apt-get install php8.1-zip
PHP 8.0
Run the following command to install php-zip for PHP 8.0.
sudo apt-get install php8.0-zip
PHP 7.4
Run the following command to install php-zip for PHP 7.4.
sudo apt-get install php7.4-zip
PHP 7.3
Run the following command to install php-zip for PHP 7.3.
sudo apt-get install php7.3-zip
After the installation is complete, you need to restart the PHP service for the changes to take effect. Run the following command to restart PHP.
sudo service apache2 restart
To ensure that php-zip is successfully installed. Run the following command to check.
php -m | grep -i zip
You might also like: