What is your default PHP.ini file?

Whether you are looking to make some custom changes to your PHP settings or just switched PHP versions and the wrong settings are being loaded, you may need the default PHP.ini file for your current PHP version. Below we will go over why this file can be important.

What does the PHP.ini file do?

The php.ini file contains all of the current PHP configuration settings: such as the execution time, memory limit, etc. This is also how PECL modules are enabled such as memcache, APC, etc. This file allows you to override the servers default configuration settings.

Setting up a new php.ini file

Easy way to load up a copy of the PHP.INI file

The PHP Configuration option is available in shared server accounts (this includes Reseller accounts). The dedicated/VPS accounts will only have the PHP Configuration option if it has been loaded. This option provides a quick and easy way to load up a PHP.INI file without having to manually create it.

  1. Log into your cPanel account
  2. Go to the Software and Services section, then click on PHP Configuration (or MultiPHP Manager for VPS users)
  3. Make sure you’re using the PHP version you want (if you’re not sure, then leave it as it is), then click on the Update button.

That will create the default PHP.INI file in your PUBLIC_HTML folder.

How to Manually Create a PHP.INI file

Clicking on the button for your PHP version will open a new window containing the correct php.ini file for that version. Below are the steps for adding a php.ini file to your account.

  1. Log into your cPanel account
  2. Open your File Manager
  3. Navigate to your public_html directory
  4. Create a new file
  5. Name it php.ini
  6. Edit the php.ini file you just created.
  7. Copy and Paste the default php.ini code from the buttons above.
  8. Clcik Save Changes

Thoughts on “What is your default PHP.ini file?

Leave a Reply to Shon Ellerton Cancel reply