How to Run EasyApache from the Command Line

Posted on Updated on

We’ve already looked at several tutorials on how to configure your WHM Web server with Apache and PHP using the convenient EasyApache tool. From this one place you can insert and remove add-ons, and change the versions of Apache and PHP used. However, the easy Apache user interface that you can access after logging into WHM has the disadvantage of using up quite a bit of additional memory. This can sometimes lead to errors if your server doesn’t have enough and the tool will then suggest that you run it from the command line instead.

In this article, I’m going to walk you through the various steps of how to do this. The only confusing bit could be the navigation, but otherwise it’s dead easy. In fact, if you want to make a quick change to your PHP or Apache configuration, running EasyApache from the command line could be a far quicker option provided you know exactly what you want and are comfortable with textbased navigation interfaces.

Configuring EasyApache from the Command Line

The first thing to do is to open up your SSH window using a program like Putty and type in the following to initiate the EasyApache utility:


After processing the command, your server will display its configuration for a split second before moving forward. I managed to capture a screenshot. You can see that it provides you details about the available and locked memory, as well as the amount of memory that was pre-allocated:

run easyapache command

If you’ve run EasyApache before and encountered some warnings or errors, the commandline utility will allow you the option to view them before going ahead. You can use the arrow keys on your keyboard to navigate between the “Yes” and “No” options:

issues last time

The next screen will provide you with various configurations as a list. The one named “**Default**” will be preselected and contains the configuration for the current server. You can use the “Tab” key to jump between both the items in the list as well as the three options below it.


You’ll also notice that the “Default” option has a little circle to the left indicating that it is currently selected. Using the navigation keys, you can view the details about each and every configuration option by selecting “Profile Details”. here is the one for the “Default” configuration.

default profile details

You can change this by highlighting any other option and pressing the right arrow key. This will toggle it from “selected” to “not selected” and vice versa. In this example, I want to take the current configuration and change the PHP version alone. To do this, I first make sure that the “Default” configuration is selected and then I use the tab key to navigate to “Customize Profile”.

customize default profile

The next screen asks you to select the Apache version, with the current one being selected by default. Like in the previous screen, you can toggle the one you want and hit “Next Step”.

choose apache

The next thing to be set is the PHP configuration. Here, I want to move it to the most recent one and as soon as I make the new selection, I get a pop-up informing me about the changes that will be made to the current configuration like which add-ons will be removed:

change php version warnings

Finally, the next screen asks us to select the add-ons from a shortlist. If you want, you can get a more exhaustive set of options just like in the regular WHM EasyApache configuration screen:

options with exhaustive

Once you’re satisfied with your choices, click the “Save and Build” option at the bottom. This will bring up a confirmation message for which you need to click “Yes”.

confirm build

This will finally initiate the compiling and configuration of Apache, PHP, and your selected add-ons. As you might be aware, this can take a bit of time so patiently wait it out until you receive the “Build Complete!” message as shown below:

build complete

Whether run from the command line or via the GUI, EasyApache is one of the most comprehensive and convenient tools for changing the configuration of the core components of your WHM server.

Leave a Reply

Your email address will not be published. Required fields are marked *