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%
FluentSnippets – High-Performance Code Snippets, Header & Footer Code, Custom CSS & PHP Code Manager
FluentSnippets is the fastest and most secure code snippets plugin for WordPress, a high-performance way to add custom code to your site without editing your theme’s functions.php file. Easily insert header and footer scripts, run PHP code snippets, and add custom CSS, JavaScript, and HTML with powerful conditional logic. ⭐ 100% free and open source. No “Pro” version, no upsells, no feature held back behind a paywall. Unlike every other code snippet plugin, FluentSnippets stores your snippets in flat files and loads them natively, so it runs zero database queries and never slows down your site. No bloated database tables, no extra SQL injection surface, just safe, native, lightning-fast code execution. Whether you want to add Google Analytics, a Facebook Pixel, ads.txt or banner ad codes, conversion tracking scripts, custom CSS tweaks, or complex PHP functionality, FluentSnippets makes it safe, secure, fast, and hassle-free. It is the perfect lightweight alternative to editing functions.php or using heavier, database-driven code snippet managers. 👉 Website: Official Website 👉 Community: Join Community 👉 Github: View source & contribute Simple for Beginners, Powerful for Developers Adding a snippet takes seconds: open the editor, paste or write your code, choose where it should run (everywhere, admin only, front-end only, or based on conditional logic), and save. A built-in syntax highlighter and smart error handling guide you along the way. If a snippet ever causes a fatal error, FluentSnippets automatically deactivates it so your site stays online instead of breaking. You can organize snippets with tags, switch them on or off with a single click, and export or import them between sites in seconds. 100% Free & Open Source: No Upsells, No “Pro” Version FluentSnippets is completely free and fully open source under the GPL. There is no premium version, no locked or “Pro-only” features, no upsells, and no email-gated downloads. Every single feature is included for everyone, on every site, forever. The full source code lives on GitHub, so developers can read the code, audit it for security, request features, report bugs, or contribute directly via pull requests. It is built and actively maintained by the team behind FluentCRM, Fluent Forms, and FluentSMTP. From Quick Tweaks to Advanced Customizations From simple tweaks to advanced development, FluentSnippets handles it all. Use it to add Google Tag Manager and tracking pixels, register custom shortcodes, create custom functions, disable comments or emojis, remove unwanted admin notices, add JSON-LD schema markup, or run any PHP snippet you would normally drop into functions.php. CSS snippets even support the WordPress Block Editor (Gutenberg), so you can style your site with a familiar editing experience. Every snippet runs only where you tell it to, thanks to granular conditional logic based on post type, page URL, user role, login status, and more, so your custom code stays fast, targeted, and easy to manage. How FluentSnippets Works: Zero Database Queries Every other code snippets plugin keeps your code in the database and queries it on every single page load. FluentSnippets does not. Each snippet is stored as a real PHP file, with its title, description, snippet type and conditional logic recorded in a doc block at the top of that file. Those doc blocks are parsed once and cached into an index, so nothing is re-parsed on later requests. At runtime the plugin simply includes the files you activated, on the action hook you chose, exactly the way WordPress loads a plugin. The result is zero database queries at runtime. Not “a few”. None at all. There is no snippets table to bloat your database, nothing for a SQL injection in some other plugin to reach, and no query for your host to slow down. It is a native, secure-by-design architecture, and it makes FluentSnippets the fastest code snippets plugin in its category. Features File-based Snippets: Your snippets are safely saved in your file system and load natively with zero database queries, so it’s safe, secure, and ultra-fast. Custom Code Snippets: Write your custom code snippets including PHP, JS, CSS, HTML, and more. Categorize your snippets with groups, tags, etc Advanced Conditional Logic: Execute code snippets solely under specified conditions like post type, date, URL, user type, and many more. Automatic Error Handling: If a snippet ever triggers a fatal error, the error handler catches it, deactivates that one snippet, and tells you which line caused it, so a bad snippet never takes your site down. Safe Mode Recovery: If custom code ever locks you out of wp-admin, a Safe Mode URL switches every snippet off so you can get back in and fix it. No FTP, no database surgery. Export & Import: Move snippets between sites, or keep a portable backup of them, in a couple of clicks. Block Editor Support: CSS snippets work inside the WordPress Block Editor (Gutenberg), so styling your site happens in a familiar place. Custom Shortcode: With custom shortcode of your snippets, you can create custom dynamic content blocks and use them across your site and manage them. Stand-alone Mode: The most interesting feature is the Stand-alone Mode. With this feature, you can add your snippets, activate the standalone mode, and then you can uninstall and delete the plugin and your snippets will still run via mu-plugins architecture and when you reactivate the plugin you can manage your snippets as before. Dark Mode: A full dark theme across every screen, switchable from the admin bar and remembered between visits. The setting is shared with the other Fluent plugins, so switching it in one switches it in all of them. Powerful Smart Conditional Logics We have added smart conditional logic to let you choose precisely where you want to execute your code. These conditional logics include User’s Login State or Role Type of Pages Post Types Taxonomy or Term-Based Rule By Page / Post URL Target Specific Page / Post / CPT Date Based Conditions FluentCRM Tag / Lists based rule of the current contact Conditions are group-based: you can add several groups, each with its own set of rules, and the snippet runs whenever any one group matches. Snippet Types FluentSnippets has four types of snippets. You can choose the snippet type from the snippet type selection. Functions – PHP Snippet: This snippet is for all the PHP code that you need to execute in specific areas like you would write in your theme’s functions.php file. You can use this snippet type to create functions/classes, hook into other actions and filters, and more. Content – PHP + HTML Snippet Type: This snippet type is used to insert content to different places like header, footer, after-post content, before-post content, etc. You can write php / html / js / css code in this snippet type. CSS Snippet Type: You can use this snippet type to add custom CSS to your site. JS Snippet Type: You can use this snippet type to add custom JS to your site. Popular use cases of this Code Snippet plugin Adding custom PHP Code to extend functionalities Adding Header and footer codes (Google Analytics / Pixel / Ads codes) Custom CSS for specific post/page types Custom Javascript codes Dynamic Content to different types of places like before/after post content or footer Dynamic Shortcode Other Plugins By The Same Team FluentCRM – Email Marketing, Newsletter, Email Automation and CRM Plugin for WordPress Fluent Forms – Fastest WordPress Form Builder Plugin Ninja Tables – Best WP DataTables Plugin for WordPress Ninja Charts – Best WP Charts Plugin for WordPress WPPayForm – Stripe Payments Plugin for WordPress Mautic Integration For Fluent Forms Fluent Forms PDF – PDF Entries for Fluent Forms FluentSMTP – WordPress Mail SMTP, SES, SendGrid, MailGun Plugin CONTRIBUTE If you want to contribute to this project or just report a bug, you are more than welcome. Please check repository from Github. FluentSnippets was known as Easy Code Manager before. We have rebuild & rebranded it to FluentSnippets.