Configure PHP-FPM options

Before running the commands shown on this page, you should load the Bitnami stack environment by executing the installdir/use_APPNAME script (Linux and MacOS) or by clicking the shortcut in the Start Menu under “Start -> Bitnami APPNAME Stack -> Application console” (Windows). On OS X VMs, the installation directory is /opt/bitnami and OS X VM users can click the “Open Terminal” button to run commands. Learn more about the Bitnami stack environment and about OS X VMs.

NOTE: The Approach A sections referred to below do not apply to Bitnami native installers. Users of Bitnami native installers should refer only to the Approach B sections.

To override any of the PHP configuration options (eg. memory_limit, max_execution_time), you must modify the following files:

  • Main PHP configuration file: installdir/php/etc/php.ini

  • PHP-FPM pool configuration file for your application: Depending on your installation type, you can find it in the following locations:

    • Approach A (Bitnami installations using system packages): installdir/php/etc/php-fpm.d/www.conf
    • Approach B (Self-contained Bitnami installations): installdir/apps/APPNAME/conf/php-fpm/php-settings.conf

For example, to increase the PHP memory limit:

  • Edit the main PHP configuration file at installdir/php/etc/php.ini and set the memory_limit variable to a new value, as shown below:

  • Modify the PHP-FPM pool configuration file and set the corresponding variable as follows. Replace the NEW_LIMIT placeholder with the new memory limit you wish to use.

  • Restart Apache and PHP-FPM for the changes to take effect:

      $ sudo installdir/ restart apache
      $ sudo installdir/ restart php-fpm
Last modification June 16, 2021