Results 1 to 1 of 1

Thread: Creating Custom php.ini Files for Sites on a cPanel VPS

  1. #1
    Join Date
    Nov 2009
    Posts
    99

    Default Creating Custom php.ini Files for Sites on a cPanel VPS

    If you have a site on your cPanel VPS that needs a custom php.ini file, you can set that up by following these steps:

    1. Copy /usr/local/lib/php.ini to the site's Web root folder (public_html). Via SSH:
      Code:
      cp /usr/local/lib/php.ini /home/USERNAME/public_html
    2. Make sure the file is owned by their cPanel user via SSH:
      Code:
       chown USERNAME:USERNAME php.ini
    3. Add the following to the site's ".htaccess" file:
      Code:
      SetEnv PHPRC /home/USERNAME/public_html/php.ini


    After you follow those steps, the custom php.ini file will take effect throughout the whole site.

    NOTE: In the above examples, replace USERNAME with the actual cPanel username.
    Last edited by jakeh; May 9th, 2012 at 12:32 PM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •