How to change Apache PHP Handler via command line?

We can change php handler through WHM > Service Configuration > Configure PHP and suEXEC but in order to change it via command line, use the following commands to change PHP handler via command line.

If you wish you may also check and configure Apache PHP Knowledgebase.

To check currently used Apache PHP Handler

/usr/local/cpanel/bin/rebuild_phpconf –current

To check Available Apache PHP Handler into the server

/usr/local/cpanel/bin/rebuild_phpconf –available

To set default Apache PHP Handler to dso

/usr/local/cpanel/bin/rebuild_phpconf 4 dso none 1

To set default Apache PHP Handler to SuPHP

/usr/local/cpanel/bin/rebuild_phpconf 5 none suphp 1

To set default Apache PHP Handler to cgi

/usr/local/cpanel/bin/rebuild_phpconf 5 none cgi 1

Thats all!!

Get Free cPanel Knowledge Base

Thank you for subscribing.

Something went wrong.

0.00 avg. rating (0% score) - 0 votes