How to modify PHP settings

To modify PHP settings the best option is to use PHP Selector, which is access through a function in your cPanel hosting.

  1. Log into Client Area
  2. Navigate to 'Services' [top menu] -- 'My Services' -- 'Manage Product' -- 'Log into cPanel' [left hand side]
  3. Once logged into cPanel, scroll down to the bottom and find 'Select PHP Version'
  4. Change your PHP version in the drop-down to whichever version you wish to run, then click 'Switch To PHP Options'
  5. Change your settings there.


You can also change these settings at the command line using a PHP.ini file


Using a PHP.ini file (advanced)

If the options you wish to change are not available to you within PHP Selector, you can use a PHP.ini file to set the variables yourself.

  1. To start navigate the 'File Manager' in cPanel.
  2. Once there click on 'public_html' on the left if not already selected (assuming you are not currently working on a sub-domain).
  3. Create a new file in this directory called 'php.ini', then edit this using either the text or code editors (recommended).
  4. Add your lines here, then click 'Save'.

TIP: Before closing the window, open a new window and test your website to ensure it still loads - if it does not, remove the content that was added last and retry until successful.

Was this answer helpful? 0 Users Found This Useful (0 Votes)