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: order allow,deny deny from all 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. 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 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/ You can also try contacting me on slack.
Top keywords
- php22×2.77%
- file20×2.52%
- settings17×2.14%
- ini16×2.02%
- custom11×1.39%
- value11×1.39%
- ini file10×1.26%
- configuration8×1.01%
- order8×1.01%
- php settings8×1.01%
- user8×1.01%
- user ini8×1.01%
SAR One Click Security
There’s a lot of WordPress security plugins with many many options and pages to setup. And that is fine if you know what to do. But most of the times, you don’t need so much or simply you’re not sure about what to set or not. This plugin adds some extra security to your WordPress with only one click. No options page, just activate it! Features Like many other security plugins SAR One Click Security adds well known .htaccess rules, but only the ones probed to be safe to use in almost any type of site (including WooCommerce stores), to protect your WordPress from common attacks. This allows you to have a safer WordPress without worries about what protection you should be using. Turn off ServerSignature directive, that may leak information about your web server. Turn off directory listing, avoiding bad configured hostings to leak your files. Blocks public access (from web) to following files that may leak information about your WordPress install: .htaccess, license.txt, readme.html, wp-config.php, wp-config-sample.php, install.php Blocks access to wp-login.php to dummy bots trying to register in WordPress sites that have registration disabled. Blocks requests looking for timthumb.php, reducing server load caused by bots trying to find it. (*) Blocks TRACE and TRACK request methods, preventing XST attacks. Blocks direct posting to wp-comments-post.php (most spammers do this) and access with blank User Agent, reducing spam comments a lot and also server load. Blocks direct access to PHP files in wp-content directory (this includes subdirectories like plugins or themes). Protecting you from a huge number of 0day exploits. Blocks direct POST to wp-login.php and access with blank User Agent, preventing most brute-force attacks and reducing server load. Blocks access to .txt files under any plugin/theme directory to prevent scans for installed plugins/themes. Blocks any query string trying to get a copy of the wp-config.php file. Blocks gf_page=upload query string argument, this was deprecated in Gravity Forms on May 2015, if your copy of Gravity Forms still uses it, update now! Removes version information from page headers. This includes not only the page header (html or xhtml) but also feed headers (rss, rss2, atom, rdf) and opml comments. Only the version number is removed, not the entire generator information. (*) If your theme uses TimThumb, you can disable that blocking rule, check FAQ before installing the plugin to see how. Requirements WordPress 3.9.2 or higher. (Works with WordPress network/multisite installation). Apache 2.4.x web server It has been tested in many servers including large providers like HostGator, Godaddy and 1&1 with optimal results, and it will work fine in any decent hosting service (that allows you to set options from .htaccess files). Anyway, if you get any problem after activating the plugin, check FAQ for instructions on how to manually uninstall it. If you’re not sure of which server is your hosting company using or if they allow to use custom .htaccess rules, I would recommend you to contact with your host support before installing the plugin. Usage To apply above mentioned security rules simply install and activate the plugin, no options page, no user setup! If you need to remove the security rules for some reason, simply deactivate the plugin. If you want to add them again, activate the plugin again, that easy 😉 And remember, if your theme uses TimThumb, check FAQ before installing the plugin.