buy
Custom PHP INI

Overview

This guide will show you how to load custom PHP INI in Webuzo.

Webuzo allows you to load custom PHP directives by creating a separate .ini file. This is the recommended method as it ensures your custom settings are not overwritten during system updates or PHP version upgrades.

Note:
We are going to show you example with php81, you can refer the following PHP names to load extensions for any other PHP's:
php56, php70, php71, php72, php73, php74, php80, php81, php82, php83,php84,php85

Steps:

You can create .ini file of any name inside the php.d directory of your specific PHP version. Webuzo automatically scans this directory for additional configurations.

Path:  /usr/local/apps/php81/etc/php.d/

You can create and edit this file using the following command:

nano /usr/local/apps/php81/etc/php.d/custom.ini

Note:  In this guide, we use custom.ini as an example. You can use any name for the file (e.g., opcache.ini, my_settings.ini, or overrides.ini) as long as it ends with the .ini extension.

Inside the file, add the PHP directives you wish to modify. For example:

memory_limit = 512M
max_execution_time = 300
date.timezone = "UTC"

Once you have saved the file, you must restart the PHP-FPM service for the changes to take effect.

Execute the following command:

/usr/local/apps/php81/bin/fpmctl restart

You can verify the changes by creating a phpinfo.php file in your domain's document root or by running the following command in the terminal:

/usr/local/apps/php81/bin/php -i | grep "memory_limit"

That's it! Your custom PHP settings are now loaded for PHP 8.1 ,similarly you can load in other PHP's, just replace the php softname which is already mentioned above.

    Was this page helpful?
    Newsletter Subscription
    Subscribing you to the mailing list