Introducing Cloudways Community Forum. Start Discussions and Get Instant Help From Cloudways Community. JOIN NOW

How to Change PHP-FPM SettingsAugust 23, 2016


In this KB

  • How to Change PHP Settings
  • Examples of PHP directives
  • Important notes


This guide will assist you on how to change your PHP related settings for FPM enabled servers using PHP Settings editor. 

Step 1: Go to Application Management

Log into the Cloudways Platform with your credentials. Click on Applications in the top menu bar and then select your target application from the list.

Application Management

Step 2: Configure PHP-FPM Settings

You can manage PHP related settings and directives by using PHP settings editor. This can be accessed from the console in PHP Settings tab in the Application Settings section under the Application Management area as shown below.

Note: Please use this editor carefully and enter values in the proper format. You may risk breaking your application(s) with incorrect settings.

PHP Settings

Examples of PHP directives

The following are a few examples of PHP directives (per application settings) for PHP-FPM enabled servers.

1) Editing the Post Max Size

2) Setting Max Input Time

3) Setting Max Execution Time

4) Setting Memory Limit

5) Editing the Upload Max File Size

6) Setting Display Errors

Important Notes:

  • Any PHP directives defined in a .htaccess will not be used. You can use the PHP settings as defined in Step 2.
  • It is important to comment rules that you have set in the htaccess file for PHP directives (commands starting with php_value or php_flag etc.). Otherwise, you’ll see an internal server error message or a blank page.
  • Non-FPM servers (those deployed before August 23, 2016) will continue to use .htaccess for PHP settings in each application.
  • The rewrite/redirect rules defined in a .htaccess file will be effective for both environments.
  • For server-level PHP settings (e.g. execution limit, max input variables, max input time etc.), go to the Server Settings section in the Server Management area.
Have Questions? Ask From Our Helpful Community

4 Responses

  1. Marijn Achterkamp says:

    Will the normal htaccess redirect keep working with FPM?

    • Cloudways says:

      Yes, the normal redirect rules will still keep on working with FPM.

      Cloudways Team

  2. Mitch says:

    This might go wrong:
    php_value[php_post_max_size] = 25M

    Instead, use this::
    php_value[post_max_size] = 25M

    • Joonas says:

      Yep, the php_value[php_post_max_size] doesn’t even work. You have to use php_value[post_max_size] instead.

Still need help? Our support team is waiting to help you. Ask them now