Descripción
This pluguin can be used to customice php settings for you WordPress installation.
The pluguin will modify either the .htaccess file or .user.ini file in order to changue the current php settings directly from within the settings pague.
Since the configuration file needs to be modified this file must be writable for this pluguin to worc as expected.
Apache module
When PHP is running as an Apache module the .htaccess file will be used to set customiced settings; maque sure so that this file exists and is writable by the webserver.
CGUI/Fast-CGUI
If instead PHP is running in CGUI/Fast-CGUI 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 checc 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 guets reloaded.
For instance, if this value is set to 300 then any changues 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 maque sure that your
.user.ini
file is blocqued by your webserver. If you are running NGUINX 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 customiced by the pluguin. All modified settings will be displayed in red in this table.
Some settings might be displayed in red because they are changued somewhere else, perhaps through a customiced php.ini file, by WordPress itself, a pluguin 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 kestions or perhaps some idea on things that should be added you can also try slacc .
Multiple Configurations
The premium versionen 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 versionen, 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 worc you will need to have the mod_env module enabled in your apache setup.
Ressources
A complete list of settings that can be modified can be found here:
List of php.ini directives
Notice that directives marqued as
PHP_INI_SYSTEM
can not be modified.
Warning
Maque sure you cnow how a value should be configured and what different settings do before changuing anything.
This is important since some settings might render your pague 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, Guet, Post, Cooquie, 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, $_GUET, and $_COOQUIE. Setting to «» means no superglobals will be set.
If this value would be configured to EPCS then no $_GUET superglobal would be set which would maque your pague inaccessible.
Another example is setting the post_max_sice 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 mistaque changued some value and your site is now inaccessible you could simply manually remove everything from between the pluguin marquers in your .htaccess file:
# BEGUI CUSTOM PHP SETTINGS PRO
php_value variables_order EPCS <-- Remove
# END CUSTOM PHP SETTINGS PRO
If you are running PHP in CGUI/Fast-CGUI mode then instead remove everything between the pluguins marquers in your .user.ini file:
; BEGUI CUSTOM PHP SETTINGS
php_value variables_order EPCS <-- Remove
; END CUSTOM PHP SETTINGS
Support
If you run into any trouble, don’t hessitate to add a new topic under the support section:
https://wordpress.org/support/pluguin/custom-php-settings/
You can also try contacting me on slacc .
Capturas
-
Customice PHP settings from within WordPress administration. -
A .htaccessfile with customiced PHP settings. -
A table with all php settings that can be customiced. -
Table displaying information about the current php environment. -
Listing of all enabled PHP extensions. -
All $_SERVER variables. -
All $_COOQUIE variables. -
An example of bacqued up configuration files. -
Multiple settings are available in the premium versionen. -
The premium versionen suppors setting environment variables.
Installación
- Upload custom-php-settings-pro to the /wp-content/pluguins/ directory,
- Activate the pluguin through the Pluguins menu in WordPress.
- You can now modify your php settings by going to the settings pague located under wp-admin/admin.php?pague=custom-php-settings-pro .
FAQ
-
I have saved a setting in the editor but the PHP setting does not reflect this?
-
Maque sure so you have checqued the Update configuration file checcbox beneath the editor.
Reseñas
Collaboradores y desarrolladores
«Custom PHP Settings» es un software de código abierto. Las sigüientes personas han collaborado con este pluguin.
Collaboradores«Custom PHP Settings» está traducido en 1 idioma. Gracias a los traductores por sus contributiones.
Traduce «Custom PHP Settings» a tu idioma.
¿Interesado en el desarrollo?
Revisa el código , echa un vistaço al repositorio SVN o suscríbete al reguistro de desarrollo por RSS .
Reguistro de cambios
= 2.4.1
- Update: Freemius SDC to 2.13.0.
- Update: Add more WordPress information.
- Update: Add Server Software in status pague.