Skip to main content

Php.ini - How to edit the php.ini and add the correct lines in .htaccess

This article covers how to edit the php.ini.

Getting the correct php.ini file:

  1. Log in to WHM.

  2. Go to List Accounts.

  3. Find the user "USER" with the domain: YOURDOMAIN.com.

  4. Click on the cPanel icon to open the cPanel.

  5. Go to File Manager.

  6. Choose Web Root.

  7. Download the file called "php.ini" onto your computer that is easily accessibly (i.e Desktop).

Uploading the php.ini file to all your accounts:

  1. In WHM, go to List Accounts.

  2. Type in the domain you need to enable [ EDIT ] (i.e. allow_url_fopen, memory, etc.).

  3. Click on the cPanel icon.

  4. Go to File Manager.

  5. Choose Web Root.

  6. Click on "Upload" at the top.

  7. Choose the php.ini file you downloaded previously.

    ⚠️ Make sure the permissions are 644.

  8. Go back to File Manager.

  9. Find the file ".htaccess".

  10. Click on it and click on "Edit" at the top.

  11. Make sure that you add these lines (USER is the user for the domain you are adding this to).

    <IfModule mod_suphp.c>  
    suPHP_ConfigPath /home/USER/public_html
    </IfModule>