How to enable custom php ini in cPanel servers with suPHP using EasyApache 4

PHP is a commonly used scripting language for websites, and its configuration settings can be managed using a server-wide php.ini file.

Most shared hosting providers enforce server-wide php ini settings on all users. But some software such as WordPress, Joomla, etc. require custom PHP ini for websites.

To allow users to configure their custom PHP settings, SuPHP can be enabled in a server. This will allow them to override the server-wide PHP settings.

PHP configuration in cPanel/WHM servers

In cPanel/WHM servers, the script EasyApache is used to recompile Apache/PHP in the server and to customize the php.ini settings.

  Our 24/7 US based phone support team coordinates with the helpdesk support team to quickly customize server settings for the customers. Learn more.

When the latest version EasyApache 4 was released, it came with many features such as PHP 7 support and custom PHP version per website.

Today we’ll see the steps to enable custom php ini for users in cPanel servers with suPHP using EasyApache 4.

Enable custom php ini in cPanel servers using EasyApache 4

Unlike its previous versions, EasyApache 4 uses ‘rebuild_phpconf’ script to manage PHP settings. As a result, its configuration is a bit different.

On servers with EasyApache 4, multiple ‘php.ini' and ‘local.ini' files manages the PHP settings. To enable custom php ini, the steps are:

Step 1 – Locate the local.ini file

The first step is to ensure that ‘local.ini’ file is present for the PHP version in the following folder:

/opt/cpanel/ea-php<php version>/root/etc/php.d



Step 2 – Generate ini file

If local.ini file is NOT present in the location ‘/opt/cpanel/ea-php<php version>/root/etc/php.d’, go to “MultiPHP INI Editor” in WHM.


PHP ini editor in WHM

PHP ini editor in WHM

See how our 24/7 support team helps you!

Step 3 – Choose the corresponding version of PHP

Since Easyapache 4 supports multiple PHP versions, it will show them as options in the editor. Select a PHP version that you want to be installed in your server.

Once you select the PHP version that you want from the drop down, you would be presented with the php.ini file corresponding to that version.


Edit php ini for PHP version

Edit php ini for PHP version



Use Bobcares for your phone support services. Ensure 24/7 coverage for your customers!



  1. Any tutorial on how to disable custom user.ini files in public_html for easyapache4?


Submit a Comment

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

BUSY WITH TECH SUPPORT ALL DAY? We help web hosts and other web solution providers save time and focus on growth.
Here's how we helped a web host reduce support engagement time from 3 hours to 30 mins per day: