Current Location: Home> Latest Articles> How to Install PHP5.5 on CentOS – Complete Installation Guide

How to Install PHP5.5 on CentOS – Complete Installation Guide

gitbox 2025-06-29

Complete Guide to Installing PHP5.5 on CentOS

In today’s web environment, PHP is a widely used server-side scripting language, and CentOS, as a popular Linux distribution, is often chosen by many developers. If you need to install PHP5.5 on a CentOS system, this article provides detailed steps to ensure a smooth installation.

Preparation

Before starting the installation, make sure your CentOS system is up to date. Update your system by running the following command:

sudo yum update -y

Installing EPEL and Remi Repositories

Since PHP5.5 is no longer officially supported, it needs to be installed via third-party repositories. First, install the EPEL and Remi repositories:

sudo yum install epel-release -y
sudo yum install https://rpms.remirepo.net/enterprise/remi-release-7.rpm -y

Enabling the Remi Repository

Next, enable the Remi repository so you can install PHP5.5. Use the following command to enable the appropriate repository:

sudo yum --config-manager --enable remi-php55

Installing PHP5.5

Now, you can install PHP5.5 along with its commonly used extensions. Use the following command:

sudo yum install php php-cli php-common php-mysql php-gd php-mbstring php-xml -y

Verifying the Installation

After installation, run the following command to check if PHP is installed correctly:

php -v

If the output shows something like “PHP 5.5.x,” it means PHP5.5 has been successfully installed.

Configuring PHP

The PHP configuration file is usually located at /etc/php.ini. You can edit this file to adjust PHP settings as needed. Open and edit the configuration file using the following command:

sudo nano /etc/php.ini

Conclusion

By following the steps outlined in this article, you can easily install PHP5.5 on a CentOS system. Although PHP5.5 is no longer officially supported, this guide is useful if you need to maintain legacy projects or applications compatible with PHP5.5.