WordPress plugin
Custom PHP Settings Pro for Writable PHP Config Files
Custom PHP Settings Pro lets WordPress administrators review and change supported PHP settings from the dashboard. Its settings table lists non-system directives the plugin can modify. PHP directives marked PHP_INI_SYSTEM cannot be changed through the extension.
Custom PHP Settings Pro lets WordPress administrators review and change supported PHP settings from the dashboard. Its settings table lists non-system directives the plugin can modify. PHP directives marked PHP_INI_SYSTEM cannot be changed through the extension.
PHP mode selects the configuration file
When PHP runs as an Apache module, the plugin writes settings to .htaccess. That file must exist and be writable by the webserver. In CGI or FastCGI mode, the plugin uses the custom INI file named by PHP’s user_ini.filename setting, commonly .user.ini. The PHP Information table shows the configured filename. Place the file in the site root where required and make it writable by the webserver.
PHP’s user_ini.cache_ttl setting controls how long a custom INI file may remain cached before PHP reloads it. A value of 300 can delay changes for up to five minutes. Configure the webserver to block direct access to .user.ini.
Saved settings and Apache variables
The paid edition supports multiple named configurations, each with its own PHP settings. Select a saved configuration to apply its values to the relevant configuration file. It also supports custom environment variables when PHP runs as an Apache module and uses .htaccess. The Apache mod_env module must be enabled, and the variables can then be accessed through $_SERVER.
Read the settings table carefully
Modified settings appear in red, but a red value may have been changed elsewhere, such as in 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.
Apply changes and recover from a bad value
Install and activate the plugin, open its settings page, and review the available PHP settings. Confirm that the applicable configuration file is writable, select supported values, and enable the option to update the configuration file when saving. Check the result after PHP reloads the settings. If a saved value does not appear to take effect, confirm that the update option was checked. For a custom INI file, the cache TTL may also delay the change.
Review each directive before applying it. A variables_order value that omits $_GET can make the website inaccessible, while a very low post_max_size can prevent submitted form data from being saved. If an incorrect setting makes the site inaccessible, remove the entries between the plugin’s marker lines in the file it uses. The .htaccess markers are # BEGIN CUSTOM PHP SETTINGS PRO and # END CUSTOM PHP SETTINGS PRO; the custom INI markers are ; BEGIN CUSTOM PHP SETTINGS and ; END CUSTOM PHP SETTINGS.