InMotion Hosting Support Center

Sometimes, when you only need to add a few changes, its easy to simply create a php.ini file with only the needed adjustments. However, for improved overall workflow you'd benefit from a complete php.ini file.

If changing your PHP version in cPanel from and back to the preferred option doesn't work, and you don't have MultiPHP INI Editor installed, you can copy a full php.ini file from another cPanel account or directly from the server.

Copy From the Server Default

  1. SSH into the cPanel account without a php.ini file.
  2. Type the command below, replacing public_html with the file path to the website without a php.ini file as needed and php56 with the applicable PHP version - i.e. 70 for 7.0.
    For VPS users:
    cp /opt/cpanel/ea-php56/root/etc/php.ini ~/public_html/
    Shared users must use the following:
    cp /usr/local/lib/php.ini ~/public_html/

Copy from Another Account

VPS users with root access can copy the php.ini file between cPanel accounts using SSH

  1. SSH into your VPS as user root.
  2. Type the command below, replacing public_html with the file path to the website without a php.ini file as needed and php56 with the applicable PHP version - i.e. 70 for 7.0.
    cp /home/user2/public_html/php.ini /home/user1/public_html/php.ini
    Replace user2 with the cPanel user with a php.ini file and user1 with the cPanel user needing one.

Copy using cPanel or FTP

    Download the php.ini file from the appropriate cPanel account using cPanel File Manager or FTP and upload it to the cPanel account for the appropriate cPanel account.


Alternatively, you can obtain a php.ini file from our What is your default php.ini file guide. You can then edit your new php.ini file and check your PHP settings with a phpinfo.php file. You may also want to make the file recursive to apply to child folders.

Was this article helpful?

Related Questions

Here are a few questions related to this article that our customers have asked:
Ooops! It looks like there are no questions about this page.
Would you like to ask a question about this page? If so, click the button below!
Ask a Question

Forum Login

You are NOT logged in. You can still browse our Support Center.

To participate within our Community Support Forum:

Post a Comment

Name:
Email Address:
Phone Number:
Comment:
Submit

Please note: Your name and comment will be displayed, but we will not show your email address.

0 Questions & Comments

Post a comment

Back to first comment | top

Need more Help?

Search

Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail: support@InMotionHosting.com
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!