Changing PHP Settings

PHP settings are controlled using php.ini files. When you deploy a server via SpinupWP, a default php.ini file is created with sensible default values. However, you are free to update these values.

Each version of PHP has its own php.ini file, which is located here:

/etc/php/{PHP_VERSION}/fpm/php.ini

Any changes made to this file will impact all sites on the server running that version of PHP, unless they are overridden by per-site settings. After you’ve made the desired configuration changes, you must reload PHP for the changes to take effect.

sudo service php{PHP_VERSION}-fpm reload

Per-Site Settings

Each site deployed via SpinupWP is created with it’s own PHP pool. This means that you can override the settings in your php.ini file on a per-site basis. Any value in your php.ini file can be overridden by adding the value to your /etc/php/{PHP_VERSION}/fpm/pool.d/{SITE_USER}.conf file, like so:

php_value[upload_max_filesize] = 64M
php_value[post_max_size] = 64M

php_value should not be used to set boolean values. Instead, use php_flag:

php_flag[display_errors] = Off

It’s also possible to prevent config values from being overridden by ini_set by using php_admin_value and php_admin_flag.

php_admin_value[upload_max_filesize] = 64M
php_admin_value[post_max_size] = 64M
php_admin_flag[display_errors] = Off

Remember to reload PHP when making any changes to your PHP pool config files.

sudo service php{PHP_VERSION}-fpm reload

Start Your 7-Day Free Trial

Start your SpinupWP journey today and spin up your first server within minutes. No credit card required.

Subscribe to get the latest news, updates and optimizations in performance and security.

Thanks for subscribing 👍

To receive awesome stuff, you'll need to head to your inbox and click on the verification link we sent you.
Make sure to check your "spam" folder or your "promotions" tab (if you have Gmail).
If you're still having trouble, then messages us at sudo@spinupwp.com.

You are already logged in

It looks like you are already logged in to SpinupWP.

Please log out of this account to continue.

Registration Successful

Thanks for registering for a new
SpinupWP account.

Before getting started, could you verify your email address by clicking on the link we just emailed to you?

SpinupWP

Free Trial

Start Your 7-Day Free Trial

No credit card required. All features included.

By signing up to SpinupWP, you agree to our Terms and Conditions.
For privacy related information, view our Privacy Policy.