What is PublishPress Revisions plugin?
Code Snippets is the most popular free WordPress plugin for managing custom PHP code without editing the theme’s functions.php file. With over 900,000 active installations and a 4.8-star rating, it is the community standard for non-developer WordPress users who want to add WordPress customizations found in tutorials without the risk of directly modifying theme files (which are overwritten on theme update).
The plugin provides an admin interface for creating, naming, describing, enabling/disabling, and organizing PHP code snippets. Each snippet can be activated or deactivated independently — making it easy to test a snippet and disable it if it causes issues without breaking the entire site. Snippets are stored in the WordPress database and execute on every page load (or on selected hook execution points). The plugin also supports CSS, JavaScript, and HTML snippet types.
Code Snippets Pro ($39/year) adds cloud backup of snippets, team collaboration features, syntax highlighting with the CodeMirror editor, a private snippet library with team sharing, and a revisions history for tracking snippet changes. The free version is sufficient for most individual users and small agencies managing snippets for their own sites. For developer teams managing snippets across multiple client sites, Code Snippets Pro’s cloud sync is the primary upgrade motivation. Code Snippets competes with WPCode (formerly Insert Headers and Footers) for the same audience.
Need Help With PublishPress Revisions Setup, Troubleshooting, or Customization?
Need help with PublishPress Revisions? Whether you are dealing with errors, broken functionality, styling problems, plugin conflicts, or advanced customization, we can help you fix the issue and get the plugin working properly on your WordPress site.
Get PublishPress Revisions Expert HelpKey Features
- Manage PHP snippets through the WordPress admin interface
- Create, enable/disable, edit, and delete snippets without touching theme files
- Snippet types: PHP, CSS, JavaScript, HTML, Gutenberg block editor snippets
- Conditional execution: run on all pages, admin only, front-end only, or on a specific hook
- Tags for snippet organization
Pros & Cons
Pros
- Safest way to add custom PHP to WordPress — deactivation is instant if something breaks
- Nearly 1 million active installations — most trusted free snippet management plugin
- Safe mode catches PHP errors and prevents site-breaking snippets from remaining active
Cons
- Database-stored snippets run on every page load — a slight performance consideration vs. file-based snippets
- Advanced editor (CodeMirror syntax highlighting) requires Pro
Free vs Premium
Free: all core snippet management, PHP/CSS/JS/HTML types, import/export. Pro ($39/year): cloud backup, team sharing, CodeMirror editor, snippet revisions, private library.
Common Problems & Fixes
A Code Snippets PHP snippet is causing a fatal error and breaking the WordPress admin — I cannot access WordPress to disable it. How do I recover?
Code Snippets has a built-in safe mode that detects PHP errors and deactivates problematic snippets. If you can reach the WordPress admin: deactivate the problematic snippet by going to Snippets → All Snippets and clicking “Deactivate.” If the admin is inaccessible due to a fatal error: (1) add “?snippets-safe-mode=1” to the admin URL — Code Snippets’ safe mode URL parameter disables all snippets and restores admin access; (2) alternatively, rename the Code Snippets plugin folder via FTP (wp-content/plugins/code-snippets → code-snippets-disabled) to deactivate it entirely, then rename it back and disable the problematic snippet.
A CSS snippet added in Code Snippets is not applying to the frontend — the CSS changes are not visible. How do I fix this?
Code Snippets CSS type snippets enqueue the CSS on the frontend. If CSS is not applying: (1) verify the snippet is set to “Front-end only” or “Everywhere” — not “Admin only”; (2) check if the snippet is active (green toggle in the snippets list); (3) clear all caches — cached CSS from the previous state may be served; (4) use browser DevTools to check if Code Snippets’ CSS file is being loaded and what it contains; (5) specificity conflicts — your CSS rule may be correct but overridden by a theme or plugin stylesheet with higher specificity. Use the browser Inspector to see what CSS wins for the target element.
Code Snippets is running a PHP snippet on pages where it should not appear — a snippet marked as front-end only is also running in the admin. How do I restrict execution scope?
Go to the snippet edit screen and look for the “Where should this snippet run?” setting. Available options vary by Code Snippets version: “Everywhere,” “Admin only,” “Front-end only,” or specific WordPress hooks. Select “Front-end only” to prevent admin execution. For more granular control (run only on specific pages or post types), add conditional logic at the beginning of the PHP snippet: if (!is_front_page()) { return; } or similar WordPress conditional tags to restrict execution to your intended context.
Customization & Developer Notes
How do I use Code Snippets to add custom functions from WordPress tutorials without editing functions.php?
When a tutorial instructs you to “add this code to your functions.php file,” use Code Snippets instead: (1) go to Snippets → Add New; (2) give the snippet a descriptive name (e.g., “Remove jQuery Migrate from frontend”); (3) paste the tutorial’s PHP code into the code editor; (4) set Run Everywhere or Front-end only as appropriate; (5) save. Enable the snippet using the toggle. The code runs exactly as if it were in functions.php but can be disabled instantly without theme file access.
How do I organize many Code Snippets with tags for easier management?
Code Snippets supports tags (visible in snippet list columns). When creating or editing a snippet, add relevant tags in the Tags field (e.g., “WooCommerce”, “Email”, “Performance”, “Client: Acme Corp”). The snippet list can be filtered by tag to see related snippets grouped together. For agencies managing many sites from one WordPress dashboard, consistent tag naming conventions (using client names or feature categories) make it much easier to audit which snippets are active and what each does.
Frequently Asked Questions
Is Code Snippets or WPCode better for managing custom PHP?
Both are excellent options for the same use case. Code Snippets has a larger installation base (900,000+) and a simpler interface focused on the snippet management workflow. WPCode (formerly Insert Headers and Footers) has a larger free feature set including conditional logic for snippet placement and more code type variety. For simple PHP snippet management, Code Snippets’ more focused interface is often preferred. For sites needing sophisticated conditional loading rules or managing both PHP snippets and header/footer scripts in one place, WPCode provides a more complete single-plugin solution.
Are snippets in Code Snippets safe — could a bad snippet break my site?
Any custom PHP code carries the risk of errors, regardless of how it is added to WordPress. Code Snippets mitigates this with its safe mode — if a snippet causes a fatal error, Code Snippets detects it and can automatically deactivate the snippet. The safe URL parameter (?snippets-safe-mode=1) also allows admin access recovery. The key safety practice is to test snippets on a staging site before activating on production, and to activate snippets one at a time rather than enabling multiple new snippets simultaneously.
Can PublishPress Revisions break after updates?
Yes, that can happen, especially on older sites with many plugins. This usually happens when the plugin, theme, and add-ons are updated out of sequence. In most cases, testing on staging catches the issue before it reaches the live site. From experience, backups and changelog reviews save a lot of cleanup time.
What should I check before installing PublishPress Revisions?
Start by checking whether another plugin already does the same job. In most cases, overlap is what creates avoidable conflicts and performance issues. A common issue is installing a plugin because it looks convenient without checking the stack first. From experience, a short compatibility review avoids most of the pain later.