Custom PHP Settings


Det här tillägget kan användas för att anpassa php inställningar för din 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 modul

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.


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.

On 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

Tillgängliga inställningar

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.


En fullständig lista med vilka inställningar som kan redigeras hittar du här: Lista med php.ini direktiv
Observera att direktiv markerade med PHP_INI_SYSTEM inte kan ändras.


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:

php_value variables_order EPCS  <-- Remove


Om du stöter på problem, tveka inte att skapa ett nytt inlägg under i hjälp-sektionen:

You can also try contacting me on slack.


  • Anpassa PHP-inställningar från adminpanelen i WordPress.
  • En file .htaccess med modifierade PHP-inställningar.
  • En tabell med alla PHP-inställningar som kan anpassas.
  • Tabell som visar information om den nuvarande PHP-miljön.
  • Listning med alla aktiva PHP-utökningar.
  • Alla $_SERVER-variabler.
  • Alla $_COOKIE-variabler.


  1. Ladda upp custom-php-settings till katalogen /wp-content/plugins/.
  2. Aktivera tillägget från menyn Tillägg i WordPress.
  3. Du kan nu anpassa dina PHP-inställningar från inställningssidan som du hittar under wp-admin/tools.php?page=custom-php-settings.


14 april 2021
Very useful if you don't have easy access to your PHP settings from cPanel on your server. It could be slightly more intuitive to get the settings into the editor, but once you know what you are looking for, it's not difficult. Since all of my sites generally require the same 3 or 4 settings to be changed, I have a text file with my useful settings for easy copy/paste.
27 september 2019
gets the job done without worrying frucking up your httpaccess files or php configfiles and anything else. simple, you put your settingsthere and boom. works.-
Läs alla 5 betyg

Bidragsgivare och utvecklare

”Custom PHP Settings” är programvara med öppen källkod. Följande personer har bidragit till detta tillägg.

Bidragande personer

”Custom PHP Settings” har översatts till 1 språk. Tack till översättarna för deras bidrag.

Översätt ”Custom PHP Settings” till ditt språk.

Intresserad av programutveckling?

Läs programkoden, kika på SVN-filförvaret eller prenumerera på utvecklarloggen via RSS.



  • Add version to scripts.
  • Bump cyclonecode/plugin to 1.0.6.
  • Remove composer plugin package.
  • Add status page.
  • Remove whitespaces in settings.
  • Add sponsor, rate and support links.
  • Refactor tabs.