Modifying the htaccess file to use a custom php.ini file throughout your website

This guide provides instructions for modifying .htaccess to use a custom php.ini throughout your cPanel site.

1. Log in to cPanel, if you haven’t already done so
2. Create a custom php.ini, if you haven't already done so.
3. Locate the absolute path of your cPanel Home Directory and make a note of it.
4. Open File Manager

5. Select the .htaccess file by clicking on it once and then click Code Editor

php guide

6. Ensure you have the correct file selected and then click Edit

php guide

7. Enter the following code, replacing homedirectory with the Home Directory you found in step 3:


<IfModule mod_suphp.c>
suPHP_ConfigPath /homedirectory/public_html/php.ini
</IfModule>

8. Once you have finished editing your .htaccess file, click Save Changes from the top right of the editing window.

php guide

  • 1 gebruikers vonden dit artikel nuttig
Was dit antwoord nuttig?

Gerelateerde artikelen

How to set up e-mail forwarding in cPanel?

1. Login into cPanel using provided URL and its credentials 2. Go to Mail section 3. Click on...

How to Access database remotely (using wildcard)?

Login into cPanel using provided URL and its credentials Go to Database section Click on the...

How to create cPanel accounts in WHM?

Hello, How to create cPanel Account in WHM Panel? Steps : * Login to your WHM Panel by...

How to Change the mail quota of an e-mail account from cPanel?

Login into cPanel using provided URL and its credentials Go to Mail section Click on Email...

Customise the php.ini file settings in Code Editor

1. Log in to cPanel, if you haven’t already done so 2. If you haven’t already done so, create a...