How To: Upgrade Apache and PHP using cPanel’s Easyapache

If you run a cPanel server, and need to upgrade your Apache or PHP version, cPanel provides the Easyapache tool to make these updates a breeze. While it can be run from WHM, it is generally preferred to run it from the command line.


Note: before you get started, make sure that you are running the below commands in a screen session. If your ssh connection drops, screen will keep the easyapache process running on the server for you.

Starting Easyapache

As root, on the command line, in screen, run:

/scripts/easyapache

This will bring up an interactive menu. Unless you completely want to rebuild your apache and php configuration from the ground up, leave the selection on Previously Saved Config, then use the Tab key and the arrow keys until you have selected Start customizing based on profile.

ea-1

Hit Enter to move to the next screen. Here you can choose which version of Apache you wish to run on your server. While Easyapache allows you to install versions of Apache that have reached end of life status, it is not recommended.

ea-2

Upgrading PHP

When you choose the version of PHP you wish to change to, make sure to research your site’s code base to see if it works with the new version. Keep in mind that Easyapache installs Zend Optimizer for PHP 5.2, and Zend Guard for PHP 5.3 and above; again, check to see that your site code is compatible before making changes.

ea-3

On the next screen, Short Options List, you can select the most commonly used Apache and PHP modules. If there is a module you wish to install that is not on this list, select Exhaustive Options List. Otherwise, click Save and Build to begin the compile process.

ea-4

Starting the Compile

Once you have hit Save and build, it is time to sit back and let Easyapache do its thing. At the end of the process, it will briefly restart apache. Until that time, do not restart apache, even if it appears to be down temporarily. Should you do so, you will not be able to bring apache back up until Easyapache can complete a new compile, leaving your sites down the whole time.

After the Compile

When the Easyapache process has finished, take some time to test your sites and make sure that they still run fine with the new versions of Apache and PHP. If you run into any trouble, you can run a new Easyapache using a saved configuration.

Of course, if at any point in the process you find yourself with questions, do not hesitate to contact Liquid Web’s Heroic Supportâ„¢ Team.

===

Liquid Web’s Heroic Support is always available to assist customers with this or any other issue. If you need our assistance please contact us:
Toll Free 1.800.580.4985
International 517.322.0434
support@liquidweb.com
https://manage.liquidweb.com/

Be Sociable, Share!
Here's $75, Launch a New VPS Today. Find out why 30,000 customers have chosen our Best-in-Class Performance & 24x7 Heroic Support.