Home
/
Website Help
/
PHP Questions
/
How to change the value of a PHP setting?

How to change the value of a PHP setting?

There are two ways to change the value of a PHP setting:

  • Using PHP Variables in Site Tools

You can change your PHP variables in the PHP Manager tool in Site Tools. To do that, access your Site Tools > Devs > PHP Manager > PHP Variables.

To edit a variable, click on the edit icon next to it and enter your value or choose one of the predefined options. Click on save and the change will be applied.

If you’re on Ultrafast PHP setup, your PHP variables will be applied to all installations and subdomains in this site. If you’re on Standard PHP, remember to select the domain you wish to edit PHP variables for first. Learn about the difference between either setup at Ultrafast PHP vs Standard PHP.

  • Manually via php.ini file

You can apply custom PHP settings on a per-folder basis using a php.ini file.

For example, if you need register_globals set to Off in a particular directory, create a php.ini file in that directory using File Manager in Site Tools. The php.ini file should contain:

register_globals = off

Naturally, if you’d like register_globals turned On you should specify:

register_globals = on

N.B: When on Ultrafast PHP, all subdomains under your site are inheriting the PHP version and variables setup from the site’s primary domain.

The values of the following PHP settings cannot be changed on our shared hosting plans due to the globally defined PHP limits:

  • memory_limit
  • max_execution_time
  • max_input_time
  • post_max_size 
  • upload_max_filesize

Note that the Cloud solutions provided by SiteGround do not have such PHP limitations.

Share This Article