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 A felhasználók hasznosnak találták ezt
Hasznosnak találta ezt a választ?

Kapcsolódó cikkek

How to scan Mail/Entire Home Directory/Public Web Space/Public FTP Space from cPanel?

1. Login in cPanel using provided URL and its credentials. 2. Click on Virus Scanner option. 3....

How do I setup personal nameservers?

To set up your own private nameservers, it is necessary to manually register them at the domain...

I lost or forgot my cPanel or WHM password - how can I reset it?

Resetting your cPanel password and finding your cPanel username is easy and can be handled...

How to install WordPress on offshore hosting?

Hello,During wordpress installation with Softaculous if you received any errors and unable to...

Enable Remote MySQL Connections in cPanel

Remote MySQL connections are disabled by default in cPanel servers because they are considered a...