How to install PHP extensions for WordPress?

How to install PHP extensions for WordPress?

This tutorial explains how to install PHP extensions for PHP versions 5.4, 5.6, 7.0, 7.1, which are required by WordPress.

After PHP version 5.6, 7.0 or 7.1 has been installed on your system, you can continue installing the extensions.

1. Install PHP and PHP extensions

PHP 5.4 (default version on CentOS 6, 7) installation:

Command: sudo yum install php -y

PHP extension installation:

Command: sudo yum install php-gd php-mysql -y

 

PHP 5.6 installation:

Command: sudo yum install php56u -y

PHP extension installation:

Command: sudo yum install php56u-gd php56u-mysql -y

 

PHP 7.0 installation:

Command: sudo yum install php70u -y

PHP extension installation:

Command: sudo yum install php70u-gd php70u-mysqlnd -y

 

PHP 7.1 installation:

Command: sudo yum install php71u -y

PHP extension installation:

Command: sudo yum install php71u-gd php71u-mysqlnd -y

2. Restart Apache2 webserver

Finally, restart your Apache2 webserver for changes to take affect.

Command: sudo systemctl restart httpd.service

 

2 Comments

  1. Pingback: How to install Wordpress on your CentOS or Ubuntu server? - Tiny Tumbleweed

  2. Pingback: How to install PHP on CentOS 6, 7? - Tiny Tumbleweed

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.