Title: Custom PHP Settings
Author: cyclonecode
Published: <strong>Favrer 25, 2019</strong>
Last modified: November 20, 2025

---

Search plugins

![](https://ps.w.org/custom-php-settings/assets/icon-256x256.png?rev=2053893)

# Custom PHP Settings

 By [cyclonecode](https://profiles.wordpress.org/cyclonecode/)

[Telechargiada](https://downloads.wordpress.org/plugin/custom-php-settings.2.4.1.zip)

 * [Details](https://roh.wordpress.org/plugins/custom-php-settings/#description)
 * [Reviews](https://roh.wordpress.org/plugins/custom-php-settings/#reviews)
 *  [Installation](https://roh.wordpress.org/plugins/custom-php-settings/#installation)
 * [Development](https://roh.wordpress.org/plugins/custom-php-settings/#developers)

 [Support](https://wordpress.org/support/plugin/custom-php-settings/)

## Descripziun

This plugin can be used to customize php settings for you WordPress installation.

The plugin will modify either the **.htaccess** file or **.user.ini** file in order
to change the current php settings directly from within the settings page.

Since the configuration file needs to be modified this file **must** be writable
for this plugin to work as expected.

#### Apache module

When PHP is running as an Apache module the **.htaccess** file will be used to set
customized settings; make sure so that this file **exists** and is **writable** 
by the webserver.

#### CGI/Fast-CGI

If instead PHP is running in CGI/Fast-CGI mode then a custom INI file will be used.
The name of this file depends on the value of **user_ini.filename** in the php configuration,
by default it is **.user.ini**.
 You can check the name of you custom INI file in
the **PHP Information** table. The custom INI file should be placed under the root
folder and **most** be **writable** by the webserver.

Notice that there is also a **User INI file cache TTL** value in the information
table, this value tells how long the custom INI file will be cached before it gets
reloaded.
 For instance, if this value is set to 300 then any changes to your custom
INI file will not be reflected for up to 5 minutes. The name for this setting in
the php configuration is **user_ini.cache_ttl**.

One important thing is to make sure that your `.user.ini` file is blocked by your
webserver. If you are running NGINX this can be done by adding:

    ```
    location ~ /\.user\.ini {
      deny all;
    }
    ```

to your server configuration. The same thing using Apache is done by adding the 
following to the configuration if not already done:

    ```
    <Files .user.ini>
    order allow,deny
    deny from all
    </Files>
    ```

#### Available Settings

The settings table will display all non-system php settings that can be customized
by the plugin. All modified settings will be displayed in red in this table.

Some settings might be displayed in red because they are changed somewhere else,
perhaps through a customized php.ini file, by WordPress itself, a plugin or in some
other way.
 For instance if you have enabled **WP_DEBUG** in your **wp-config.php**
file the **error_reporting** setting will turn red.

If you have questions or perhaps some idea on things that should be added you can
also try [slack](https://join.slack.com/t/cyclonecode/shared_invite/zt-6bdtbdab-n9QaMLM~exHP19zFDPN~AQ).

#### Multiple Configurations

The premium version adds support for creating multiple named configurations which
all can hold their own custom PHP settings.
 You will then be able to easily switch
between the different configurations entries applying them to you configuration 
file.

#### Environment Variables

In the premium version, when running PHP as an apache module and using an **.htaccess**
file for configuration, you are able
 to add custom environment variables. These
will be accessible by using the super global **$_SERVER** array. In order for this
to work you will need to have the mod_env module enabled in your apache setup.

#### Resources

A complete list of settings that can be modified can be found here: [List of php.ini directives](http://php.net/manual/en/ini.list.php)

Notice that directives marked as `PHP_INI_SYSTEM` can not be modified.

### Warning

Make sure you know how a value should be configured and what different settings 
do before changing anything.
 This is important since some settings might render
your page inaccessible, depending on what value you are using. A good example of
this is the **variables_order** configuration:

> Sets the order of the EGPCS (Environment, Get, Post, Cookie, and Server) variable
> parsing. For example, if variables_order is set to „SP“ then PHP will create the
> superglobals $_SERVER and $_POST, but not create $_ENV, $_GET, and $_COOKIE. Setting
> to „“ means no superglobals will be set.

If this value would be configured to **EPCS** then no **$_GET** superglobal would
be set which would make your page inaccessible.

Another example is setting the **post_max_size** to a very low value so that no 
form data is sent to the server, which in turn would result in that form data is
never saved.

If you by mistake changed some value and your site is now inaccessible you could
simply manually remove everything from between the plugin markers in your **.htaccess**
file:

    ```
    # BEGIN CUSTOM PHP SETTINGS PRO
    php_value variables_order EPCS  <-- Remove
    # END CUSTOM PHP SETTINGS PRO
    ```

If you are running PHP in CGI/Fast-CGI mode then instead remove everything between
the plugins markers in your **.user.ini** file:

    ```
    ; BEGIN CUSTOM PHP SETTINGS
    php_value variables_order EPCS  <-- Remove
    ; END CUSTOM PHP SETTINGS
    ```

### Support

If you run into any trouble, don’t hesitate to add a new topic under the support
section:
 [https://wordpress.org/support/plugin/custom-php-settings/](https://wordpress.org/support/plugin/custom-php-settings/)

You can also try contacting me on [slack](https://join.slack.com/t/cyclonecode/shared_invite/zt-6bdtbdab-n9QaMLM~exHP19zFDPN~AQ).

## Maletgs dal visur

 * [[
 * Customize PHP settings from within WordPress administration.
 * [[
 * A `.htaccess` file with customized PHP settings.
 * [[
 * A table with all php settings that can be customized.
 * [[
 * Table displaying information about the current php environment.
 * [[
 * Listing of all enabled PHP extensions.
 * [[
 * All $_SERVER variables.
 * [[
 * All $_COOKIE variables.
 * [[
 * An example of backed up configuration files.
 * [[
 * Multiple settings are available in the premium version.
 * [[
 * The premium version supports setting environment variables.

## Installaziun

 1. Upload custom-php-settings-pro to the **/wp-content/plugins/** directory,
 2. Activate the plugin through the **Plugins** menu in WordPress.
 3. You can now modify your php settings by going to the settings page located under
    _wp-admin/admin.php?page=custom-php-settings-pro_.

## FAQ

### I have saved a setting in the editor but the PHP setting does not reflect this?

Make sure so you have checked the _Update configuration file_ checkbox beneath the
editor.

## Reviews

![](https://secure.gravatar.com/avatar/39ee98271b6d0af401bf594a274c0ddf636ce60e2f1d3d0d9c4c88cf6c10173b?
s=60&d=retro&r=g)

### 󠀁[very bad](https://wordpress.org/support/topic/very-bad-158/)󠁿

 [picklypickle](https://profiles.wordpress.org/picklypickle/) Mars 19, 2025

THE worst

![](https://secure.gravatar.com/avatar/daa89d2a0ce10421ad50a89d02691fb7334c5eb5f13c263459bf50fd020f5c56?
s=60&d=retro&r=g)

### 󠀁[Bad got worse](https://wordpress.org/support/topic/bad-got-worse/)󠁿

 [cantoute](https://profiles.wordpress.org/cantoute/) Zercladur 25, 2024 1 reply

The plugin is badly coded… could be handy but since last updates it has decided 
you needed a premium to set vars like post_max_size

![](https://secure.gravatar.com/avatar/caa0479b58a9d6203ac99edc2cded177c49468c0c41d19f67d14acddf8fb2b03?
s=60&d=retro&r=g)

### 󠀁[Amazing so Simple](https://wordpress.org/support/topic/amazing-so-simple/)󠁿

 [deffectrix](https://profiles.wordpress.org/deffectrix/) December 5, 2022

This is an awesome plugin, works like a charm. Thank you.

![](https://secure.gravatar.com/avatar/c70616123cce91c86d92b5515559973ba2c0bc1226be4e48ac68537f3d393adc?
s=60&d=retro&r=g)

### 󠀁[Best PHP-Settings Pluign](https://wordpress.org/support/topic/best-php-settings-pluign/)󠁿

 [offloris](https://profiles.wordpress.org/offloris/) Zercladur 5, 2022

When i downloaded the Plugin i have thinked that it wouldnt be work but i was shocked.
It worked!!! Thank you!

![](https://secure.gravatar.com/avatar/239556da976d799f646626bdddfad7a4eb9dd29924c51e71b90bcb7f90c2cd10?
s=60&d=retro&r=g)

### 󠀁[Gorgeous Plugin](https://wordpress.org/support/topic/gorgeous-plugin-6/)󠁿

 [osandigital](https://profiles.wordpress.org/osandigital/) Matg 18, 2022

This is just „simply“ beautiful. Thank you for this. Time-saving.

![](https://secure.gravatar.com/avatar/1af6576b77bb9a70f3e5be2921769896502f27e43d7ac83a1f1293cb414eea3c?
s=60&d=retro&r=g)

### 󠀁[Good one](https://wordpress.org/support/topic/good-one-535/)󠁿

 [barnabas1](https://profiles.wordpress.org/barnabas1/) Schaner 29, 2022

Works for me absolutely fine! Thank you for your work.

 [ Read all 15 reviews ](https://wordpress.org/support/plugin/custom-php-settings/reviews/)

## Contributors & Developers

“Custom PHP Settings” is open source software. The following people have contributed
to this plugin.

Contributors

 *   [ cyclonecode ](https://profiles.wordpress.org/cyclonecode/)

“Custom PHP Settings” has been translated into 1 locale. Thank you to [the translators](https://translate.wordpress.org/projects/wp-plugins/custom-php-settings/contributors)
for their contributions.

[Translate “Custom PHP Settings” into your language.](https://translate.wordpress.org/projects/wp-plugins/custom-php-settings)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/custom-php-settings/),
check out the [SVN repository](https://plugins.svn.wordpress.org/custom-php-settings/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/custom-php-settings/)
by [RSS](https://plugins.trac.wordpress.org/log/custom-php-settings/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

= 2.4.1

 * Update: Freemius SDK to 2.13.0.
 * Update: Add more WordPress information.
 * Update: Add Server Software in status page.

## Meta

 *  Version **2.4.1**
 *  Last updated **avant 5 mais**
 *  Active installations **10'000+**
 *  WordPress version ** 4.1.0 or higher **
 *  Tested up to **6.8.5**
 *  PHP version ** 5.6 or higher **
 *  Languages
 * [English (US)](https://wordpress.org/plugins/custom-php-settings/) e [Swedish](https://sv.wordpress.org/plugins/custom-php-settings/).
 *  [Translate into your language](https://translate.wordpress.org/projects/wp-plugins/custom-php-settings)
 * Tags
 * [Apache](https://roh.wordpress.org/plugins/tags/apache/)[htaccess](https://roh.wordpress.org/plugins/tags/htaccess/)
   [php](https://roh.wordpress.org/plugins/tags/php/)[settings](https://roh.wordpress.org/plugins/tags/settings/)
 *  [Advanced View](https://roh.wordpress.org/plugins/custom-php-settings/advanced/)

## Ratings

 4.4 out of 5 stars.

 *  [  12 5-star reviews     ](https://wordpress.org/support/plugin/custom-php-settings/reviews/?filter=5)
 *  [  1 4-star review     ](https://wordpress.org/support/plugin/custom-php-settings/reviews/?filter=4)
 *  [  0 3-star reviews     ](https://wordpress.org/support/plugin/custom-php-settings/reviews/?filter=3)
 *  [  0 2-star reviews     ](https://wordpress.org/support/plugin/custom-php-settings/reviews/?filter=2)
 *  [  2 1-star reviews     ](https://wordpress.org/support/plugin/custom-php-settings/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/custom-php-settings/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/custom-php-settings/reviews/)

## Contributors

 *   [ cyclonecode ](https://profiles.wordpress.org/cyclonecode/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/custom-php-settings/)

## Dar

Would you like to support the advancement of this plugin?

 [ Donate to this plugin ](https://www.buymeacoffee.com/cyclonecode)