Title: Custom PHP Settings
Author: cyclonecode
Published: <strong>25 فوریه 2019</strong>
Last modified: 20 نوامبر 2025

---

جستجوی افزونه‌ها

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

# Custom PHP Settings

 توسط [cyclonecode](https://profiles.wordpress.org/cyclonecode/)

[دانلود](https://downloads.wordpress.org/plugin/custom-php-settings.2.4.1.zip)

 * [جزئیات](https://fa.wordpress.org/plugins/custom-php-settings/#description)
 * [نقد و بررسی‌ها](https://fa.wordpress.org/plugins/custom-php-settings/#reviews)
 *  [نصب](https://fa.wordpress.org/plugins/custom-php-settings/#installation)
 * [توسعه](https://fa.wordpress.org/plugins/custom-php-settings/#developers)

 [پشتیبانی](https://wordpress.org/support/plugin/custom-php-settings/)

## توضیحات

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).

## عکس‌های صفحه

 * [[
 * 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.

## نصب

 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_.

## سوالات متداول

### 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.

## نقد و بررسی‌ها

![](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/) 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/) 25 ژوئن 2024 1 پاسخ

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/) 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/) 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/) 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/) 29 ژانویه 2022

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

 [ خواندن تمامی 15 نقد و بررسی‌ ](https://wordpress.org/support/plugin/custom-php-settings/reviews/)

## توسعه دهندگان و همکاران

“Custom PHP Settings” نرم افزار متن باز است. افراد زیر در این افزونه مشارکت کرده‌اند.

مشارکت کنندگان

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

“Custom PHP Settings” به 1 زبان ترجمه شده است. با تشکر از [مترجمین](https://translate.wordpress.org/projects/wp-plugins/custom-php-settings/contributors)
برای همکاری و کمک‌هایشان.

[ترجمه “Custom PHP Settings” به زبان شما.](https://translate.wordpress.org/projects/wp-plugins/custom-php-settings)

### علاقه‌ مند به توسعه هستید؟

[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).

## گزارش تغییرات

= 2.4.1

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

## اطلاعات

 *  نگارش **2.4.1**
 *  Last updated **5 ماه پیش**
 *  نصب‌های فعال **10,000+**
 *  نگارش وردپرس ** 4.1.0 یا بالاتر **
 *  Tested up to **6.8.5**
 *  نگارش PHP ** 5.6 یا بالاتر **
 *  زبان‌ها
 * [English (US)](https://wordpress.org/plugins/custom-php-settings/) و [Swedish](https://sv.wordpress.org/plugins/custom-php-settings/).
 *  [به زبان خودتان ترجمه کنید](https://translate.wordpress.org/projects/wp-plugins/custom-php-settings)
 * Tags
 * [Apache](https://fa.wordpress.org/plugins/tags/apache/)[htaccess](https://fa.wordpress.org/plugins/tags/htaccess/)
   [php](https://fa.wordpress.org/plugins/tags/php/)[settings](https://fa.wordpress.org/plugins/tags/settings/)
 *  [نمایش پیشرفته](https://fa.wordpress.org/plugins/custom-php-settings/advanced/)

## امتیازها

 4.4 از 5 ستاره.

 *  [  امتیاز 12 5-ستاره     ](https://wordpress.org/support/plugin/custom-php-settings/reviews/?filter=5)
 *  [  امتیاز 1 4-ستاره     ](https://wordpress.org/support/plugin/custom-php-settings/reviews/?filter=4)
 *  [  امتیاز 0 3-ستاره     ](https://wordpress.org/support/plugin/custom-php-settings/reviews/?filter=3)
 *  [  امتیاز 0 2-ستاره     ](https://wordpress.org/support/plugin/custom-php-settings/reviews/?filter=2)
 *  [  امتیاز 2 1-ستاره     ](https://wordpress.org/support/plugin/custom-php-settings/reviews/?filter=1)

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

[مشاهده همه بررسی‌ها](https://wordpress.org/support/plugin/custom-php-settings/reviews/)

## مشارکت کنندگان

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

## پشتیبانی

چیزی برای گفتن دارید؟ نیاز به کمک دارید؟

 [مشاهده انجمن پشتیبانی](https://wordpress.org/support/plugin/custom-php-settings/)

## کمک مالی

آیا تمایل دارید از پیشرفت این افزونه حمایت کنید؟

 [ کمک مالی به این افزونه ](https://www.buymeacoffee.com/cyclonecode)