Manage PHP settings from WordPress
Custom PHP Settings Pro provides a dashboard-based way to customize available PHP settings for a WordPress installation. Instead of editing configuration files manually, administrators can use the plugin’s settings page to update supported values and write them to the configuration file used by the server.
The plugin works with either an .htaccess file or a .user.ini file, depending on how PHP is running. When PHP runs as an Apache module, the plugin uses .htaccess. When PHP runs in CGI or FastCGI mode, it uses the custom INI file defined by the PHP configuration, which is commonly .user.ini.
Paid edition capabilities
- Multiple configurations: Create several named configurations, each with its own PHP settings.
- Configuration switching: Select a saved configuration and apply its values to the relevant configuration file.
- Environment variables: When PHP runs as an Apache module and .htaccess is used, add custom environment variables that can be accessed through the $_SERVER superglobal.
- Available settings table: Review non-system PHP settings that can be customized by the plugin.
- Change visibility: Modified settings are shown in red in the settings table.
The settings table can also show values changed elsewhere, such as through a customized php.ini file, WordPress, or another plugin. For example, enabling WP_DEBUG in wp-config.php can affect the displayed error_reporting status. PHP directives marked PHP_INI_SYSTEM cannot be modified through this plugin.
Practical configuration workflow
Use the editor to choose and save supported PHP values, then select the option to update the configuration file. Named configurations are useful when you need separate groups of settings for different purposes and want to switch between them without rebuilding each group manually.
Environment variables are available only for the Apache-module and .htaccess setup, and the Apache mod_env module must be enabled. Server file permissions are also important: the relevant .htaccess or .user.ini file must exist where required and be writable by the webserver.
Important server considerations
Changing PHP values can affect how a site operates. Settings such as variables_order or post_max_size may prevent expected request data or superglobals from being available if configured incorrectly. Review the purpose of each directive before applying a change.
The .user.ini file should be blocked by the webserver. The PHP user INI cache TTL also determines how long changes may remain cached before being reloaded. If an incorrect value makes the site inaccessible, the plugin markers and their contents can be removed manually from .htaccess or .user.ini.
Installation and first use
Install and activate Custom PHP Settings Pro in WordPress, open its settings page, and review the available PHP settings. Confirm that the configuration file is writable by the webserver, choose the required values, enable the option to update the configuration file, and verify the result after the server reloads the settings.