Managing PHP and HTML snippets from the WordPress dashboard
Code Snippets brings custom PHP and reusable HTML into a dashboard workflow, with controls for where code runs and how it is organized. PHP can run everywhere, in administration only, or on the front end; manually confirmed run-once behavior is also available for one-time tasks. HTML snippets can be inserted into posts and pages using shortcodes.
The editor includes syntax highlighting and code checks, while code previews let you inspect snippets without opening the editor. Tags, search, filters, sorting, and bulk actions help manage larger collections; table and card views, snippet locks, and Stats add practical ways to review and protect them. This setup suits site owners who need to reuse and organize custom code without editing theme files.
Moving snippets between sites and running them on multisite
The plugin supports both portable exports and separate snippet management across multisite installations.
- Import and export: Move one or more snippets using export files, then import them through the Snippets screen on another site.
- PHP file export: Export PHP snippets as a PHP file for use without the plugin; review the code before including it in a theme or plugin.
- Community Cloud: Search, preview, and download community-shared snippets from inside WordPress. A Cloud account is not needed for local PHP and HTML snippets.
- File-based execution: Optionally run supported snippets from generated files rather than evaluating them from the database, which gives administrators another execution choice.
- Multisite management: Manage network-wide snippets and separate snippets for individual sites. Network activation can run a snippet across the network, subject to its execution scope.
How Code Snippets Pro extends the free plugin
Pro adds code types, editing controls, and connected workflows for more advanced snippet management.
- CSS and JavaScript: Create these snippet types, with dedicated integration for Gutenberg and Elementor.
- AI-assisted generation and Blueprints: Generate code from an approved plan or use forms for common tasks such as custom post types, taxonomies, and settings pages. Review generated code before activation.
- Revisions and display conditions: Compare and restore earlier code, and set where or when snippets run through a visual editor.
- Permissions and reporting: Set role-based access to snippet actions and see which snippets ran or produced output on the current page.
- Performance and security insights: Track PHP execution time and check for potentially risky code patterns; these checks are advisory, not a security audit.
- Connected Cloud workflows: Synchronize a personal library, deploy snippets to connected sites, and view differences between site and Cloud copies. These features require the relevant Pro access and a connected Cloud account.
Recovery and control when snippets cause problems
Safe Mode can stop snippets from running while you investigate a failure, but careful code review and backups remain essential.
- Recovery: Use Safe Mode to troubleshoot snippet-related errors, then fix or deactivate the affected code.
- Code safety: Activate only PHP you trust and keep a current backup. Advisory security checks cannot guarantee that a snippet is safe or prevent every error.
- Uninstall choices: Enable Complete Uninstall before deleting the plugin to remove stored snippets and settings; leave it disabled to retain them. Export snippets you want to keep before removal.
A mature snippet manager with practical safeguards
Code Snippets is a well-established option with broad adoption, an excellent user rating, and a recent update. Its support team resolved 73% of 26 support threads, a positive record that still leaves some requests unresolved.
The free plugin's execution controls, organization tools, and recovery option suit site owners who want to manage custom code centrally. The main trade-off is inherent to the job: PHP snippets can affect site behavior, so users need to review code and maintain backups. Pro is worth considering for teams that need CSS or JavaScript snippets, tighter permissions, revision history, or connected deployment workflows.