Manage PHP Extensions
To install and manage PHP extensions:
- Connect to SSH Terminal – Open any SSH terminal (ex: PuTTY ), connect to your Ubuntu/CentOS server, and login as a server
root
user. - Choose the command from below list, according to your server operating system, and run it.
For Ubuntu
Extension install command syntax:
For php 7.2 => sudo apt install ze-php72-<extension-name>
For php 7.3 => sudo apt install ze-php73-<extension-name>
For php 7.4 => sudo apt install ze-php74-<extension-name>
Example: sudo apt install ze-php74-curl
sudo apt install ze-php74-bcmath
sudo apt install ze-php74-bz2
sudo apt install ze-php74-calendar
sudo apt install ze-php74-cli
sudo apt install ze-php74-curl
sudo apt install ze-php74-dba
sudo apt install ze-php74-enchant
sudo apt install ze-php74-exif
sudo apt install ze-php74-fileinfo
sudo apt install ze-php74-fpm
sudo apt install ze-php74-ftp
sudo apt install ze-php74-gd
sudo apt install ze-php74-gettext
sudo apt install ze-php74-gmp
sudo apt install ze-php74-iconv
sudo apt install ze-php74-imagick (not available in php72)
sudo apt install ze-php74-imap
sudo apt install ze-php74-intl
sudo apt install ze-php74-ioncube
sudo apt install ze-php74-ldap
sudo apt install ze-php74-litespeed
sudo apt install ze-php74-mbstring
sudo apt install ze-php74-mysqlnd
sudo apt install ze-php74-odbc
sudo apt install ze-php74-opcache
sudo apt install ze-php74-pdo
sudo apt install ze-php74-pgsql
sudo apt install ze-php74-posix
sudo apt install ze-php74-process
sudo apt install ze-php74-pspell
sudo apt install ze-php74-snmp
sudo apt install ze-php74-soap
sudo apt install ze-php74-sockets
sudo apt install ze-php74-sodium
sudo apt install ze-php74-tidy
sudo apt install ze-php74-xml
sudo apt install ze-php74-xmlrpc
sudo apt install ze-php74-zip
For CentOS
Extension install command syntax:
For php 7.2 => sudo yum install ze-php74-php-<extension-name>
For php 7.3 => sudo yum install ze-php74-php-<extension-name>
For php 7.4 => sudo yum install ze-php74-php-<extension-name>
Example: sudo yum install ze-php74-php-curl
sudo yum install ze-php74-php-bcmath
sudo yum install ze-php74-php-bz2
sudo yum install ze-php74-php-calendar
sudo yum install ze-php74-php-cli
sudo yum install ze-php74-php-curl
sudo yum install ze-php74-php-dba
sudo yum install ze-php74-php-enchant
sudo yum install ze-php74-php-exif
sudo yum install ze-php74-php-fileinfo
sudo yum install ze-php74-php-fpm
sudo yum install ze-php74-php-ftp
sudo yum install ze-php74-php-gd
sudo yum install ze-php74-php-gettext
sudo yum install ze-php74-php-gmp
sudo yum install ze-php74-php-iconv
sudo yum install ze-php74-php-imap
sudo yum install ze-php74-php-intl
sudo yum install ze-php74-php-ioncube
sudo yum install ze-php74-php-ldap
sudo yum install ze-php74-php-litespeed
sudo yum install ze-php74-php-mbstring
sudo yum install ze-php74-php-mysqlnd
sudo yum install ze-php74-php-odbc
sudo yum install ze-php74-php-opcache
sudo yum install ze-php74-php-pdo
sudo yum install ze-php74-php-pgsql
sudo yum install ze-php74-php-posix
sudo yum install ze-php74-php-process
sudo yum install ze-php74-php-pspell
sudo yum install ze-php74-php-snmp
sudo yum install ze-php74-php-soap
sudo yum install ze-php74-php-sockets
sudo yum install ze-php74-php-tidy
sudo yum install ze-php74-php-xml
sudo yum install ze-php74-php-xmlrpc
sudo yum install ze-php74-php-zip