Change php ini cpanel

This guide describes how to edit the php.ini file on shared servers [Stellar and Stellar Plus plans, as well as old Value, Professional, and Ultimate plans].

If your account is hosted on the Business server [Stellar Business or old Business SSD plans], use this guide.

However, advanced PHP settings are missing from the Select PHP Version tool and must be manually configured in the php.ini file. You can either create the file or upload the existing one to your account.

1. Log into your cPanel account, go to the Files section >> the File Manager menu.

For cPanel Basic Theme:

For cPanel Retro Theme:

2. Navigate to the root directory of the domain, click on New File, and create a file named php.ini:

3. Find the newly created file in the list, right-click, and choose Edit:

4. Add the required PHP settings and click on Save Changes in the top right corner:

1. Log into your cPanel account, go to the Files section >> the File Manager menu.

For cPanel Basic Theme:

For cPanel Retro Theme:

2. Navigate to the root directory of the domain name in question, upload the php.ini file. Feel free to download php.ini below in the Attachments section at the end of the guide.

3. Once done, use the Extract option:

4. After that, right-click on php.ini to use the Edit option:

5. Here, you can use the search option and find the needed limit or value. In this example, it is upload_max_filesize.

6. Once all the required changes are made, click Save.

That's it!

Need any help? Contact our Helpdesk

  • Overview
  • Available PHP Versions
  • How to Update PHP
  • Fix MultiPHP Error
  • php.ini
  • Limits
  • View Settings

The php.ini file is a special file for PHP. It is where you declare changes to your PHP settings. The server is already configured with standard settings for PHP, which your site will use by default. Unless you need to change one or more settings, there is no need to create or modify a php.ini file. If you would like to make any changes to settings, please do so through the MultiPHP INI Editor.

  • How To Modify PHP Settings
  • How To Create a New php.ini File

How To Modify PHP Settings via the MultiPHP INI Editor

There may be times where you need to change some of the default PHP settings, and below we've outlined those steps. However, keep in mind that there are PHP Settings That Cannot Be Changed on our Shared, Cloud, & Reseller hosting.

To modify the PHP settings:

  1. Log in to cPanel.
  2. In the Software section, click on the MultiPHP INI Editor icon.

  3. On the MultiPHP INI Editor page, select Home Directory or the specific domain you wish to update from the Configure PHP INI basic settings dropdown.

  4. Select the new setting for each PHP directive you would like to change.

  5. Click Apply at the bottom to save your changes.

How to Create a New php.ini File

Important Note: HostGator won't know why you want or need to change these settings. You would change this at the advice of your web designer or the developer of your script. HostGator can only show you where to make the change.

  • For Plesk users, the file should already exist in the directory  /var/www/vhost/$DOMAIN/etc/php.ini.
  • For the cPanel, this file should be created in your Home directory [/home/username/].

The username is your actual cPanel username, and $DOMAIN is your actual domain.

To create a new php.ini file in your cPanel:

  1. In the Files section of your cPanel, click on the File Manager icon.

  2. Select the root directory for your site. The default for the primary is public_html.
  3. Click the + File button at the top left of the page.

  4. In the pop-up box, enter php.ini in the New File Name field. Make sure the root directory is in the bottom box.

  5. Click Create New File.
  6. Locate and right-click the new php.ini file and select Edit, then click the Edit button again.
  7. You can now input the contents of your php.ini file. Click Save to save your changes.

How do I change PHP ini in cPanel?

How to Edit the php..
1] Log into cPanel..
2] Look for the SOFTWARE section and click on Select PHP version..
3] In the new window click on the Switch To PHP Options button..
4] Here you can locate the PHP directive you wish to amend and click the value..

How do I access PHP ini in cPanel?

ini file in your cPanel:.
In the Files section of your cPanel, click on the File Manager icon..
Select the root directory for your site. ... .
Click the + File button at the top left of the page..
In the pop-up box, enter php. ... .
Click Create New File..
Locate and right-click the new php. ... .
You can now input the contents of your php..

How do I change PHP ini?

How to edit the php.ini file.
Log in to your HostPapa Dashboard..
Click on My cPanel or My WordPress..
Scroll down to the Software section and click Select PHP Version..
Now click Options..
Locate the PHP directive you wish to amend and click the value..

How do I find PHP settings in cPanel?

In cPanel search for php, You will find "Select PHP version" under Software. Software -> Select PHP Version -> Switch to Php Options -> Change Value -> save.

Bài mới nhất

Chủ Đề