~3 min read • Updated Feb 21, 2026
1. Create Custom PHP Directives
Important: This feature only applies to systems running EasyApache 4.
If your system requires additional PHP configuration, you can create custom PHP INI directives. To ensure that WHM’s MultiPHP INI Editor (Editor Mode) recognizes and validates your custom directives, you must store them in:
/etc/cpanel/ea4/phpini_directives
1.1 How to Add a Custom PHP Directive
- Create the directory above if it does not already exist.
- Inside the directory, create a
.yamlfile. - Define your directives inside the
directiveskey using the same structure as the system file.
Example YAML structure:
directives:
directive_foo:
changeable: PHP_INI_ALL
default: foo
multiple: 0
note: '...'
section: '...'
type: string
directive_bar:
changeable: PHP_INI_PERDIR
default: 1
multiple: 0
note: '...'
deprecated: 5.4.0
section: '...'
type: boolean
Notes:
- If the directive already exists, the system ignores it.
- The system reads
/usr/local/cpanel/whostmgr/etc/phpini_directives.yamlfirst, then reads files in/etc/cpanel/ea4/phpini_directivesin ASCII order. - The first occurrence of a directive is the one used.
2. Install a Jekyll Ruby Application
Jekyll is a static site generator built on Ruby. This section explains how to install and deploy a Jekyll application on a cPanel server.
Warning: cPanel does not develop or support Jekyll. Only experienced system administrators should perform these steps.
You may perform all steps via SSH or through cPanel’s Terminal interface.
2.1 Pre‑Installation Requirements
Update RubyGems to the latest version:
source /opt/cpanel/ea-ruby27/enable && gem update --system
Ensure the following EasyApache 4 RPMs are installed:
ea-ruby27-mod_passengerea-ruby27-ruby-devel
To install them:
yum install ea-ruby27-mod_passenger ea-ruby27-ruby-devel
2.2 Install Bundler and Jekyll
Install the required Ruby gems as the root user:
scl enable ea-ruby27 'gem install bundler jekyll'
If you prefer not to use scl:
- Log in as a cPanel user.
- Add this line to your shell’s rc file (e.g.,
~/.bashrc):
source /opt/cpanel/ea-ruby27/enable
Log out and back in, then run:
gem install bundler jekyll
2.3 Create Your Jekyll Website
To create a new Jekyll application:
scl enable ea-ruby27 'jekyll new hyde'
2.4 Build and Deploy the Application
Navigate to the /hyde directory and build the site:
scl enable ea-ruby27 'jekyll build --baseurl '/hyde' --destination ~/public_html/hyde'
Then visit your new site in a browser:
http://example.com/hyde
In this example, example.com represents your domain.
Conclusion
This guide helps you create custom PHP directives for EasyApache 4 and install a Jekyll Ruby application on a cPanel server. These tools provide powerful customization options for developers and system administrators.
Written & researched by Dr. Shahin Siami