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 Los Usuarios han Encontrado Esto Útil
¿Fue útil la respuesta?

Artículos Relacionados

Creating a new php.ini file

If you do not have a php.ini file in your public_html folder you can create one by following the...

cPanel - Backup Wizard

You can use cPanel Backup Wizard to Backup and Restore your cPanel website step by step. cPanel...

How to install and uninstall FrontPage extensions?

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

Is it possible to modify php.ini on shared or reseller hosting account?

U can customize these settings by putting a custom php.in in public_html folder or by writing...

Migration of cPanel/WHM From other Servers

Hello, How to Migrate an cPanel from one server to another server without Root access over FTP?...