Plugin
PluginUpdated
MainWP Code Snippets Extension
MainWP Code Snippets Extension is a WordPress plugin by MainWP for managing PHP code across multiple child sites.
Product facts
- Version
- 5.1.1
- Released
- 18 June 2026
- Type
- Plugin
- Licence
- GPL
- Included in
- Every plan, or $4.79 / year on its own
Overview
Managing PHP snippets across a group of WordPress sites can mean repeating the same edits on each site. MainWP Code Snippets Extension brings that work into the MainWP Dashboard, where you can add, edit, and store snippets for use across child sites. It suits developers, agencies, and site managers who oversee multiple WordPress installations and want a central place to handle routine code tasks.
Run snippets on child sites, use them to retrieve information such as post counts, or make changes to wp-config.php remotely. Snippets can also handle tasks such as cleaning up trash, changing settings, creating redirections, and updating widgets or plugin configurations. The extension supports code-based site hardening, including disabling theme and plugin editors and blocking core updates. Its documentation recommends testing code on test sites before using it on live sites.
Features
- Central snippet management: Add, edit, and store PHP code snippets for your child sites from the MainWP Dashboard instead of switching between individual WordPress sites.
- Run code across sites: Execute snippets on multiple child sites, including across all managed sites, to apply the same code-based task throughout your portfolio.
- Retrieve site information: Use snippets to retrieve site data, including post counts, from child sites through the centralized dashboard.
- Change configuration files: Modify wp-config.php files remotely through snippets, without logging into each child site separately.
- Apply hardening settings: Use code snippets to disable theme and plugin editors, block core updates, adjust auto-save intervals, or prevent external HTTP requests.
- Update settings and widgets: Synchronize plugin configurations and update widgets across managed WordPress sites using snippets from the MainWP Dashboard.
Best for
- WordPress agencies managing child sites
- Developers maintaining multiple WordPress sites
- Site managers handling routine code tasks
Changelog
Version 5.1.1 — 16 June 2026
- Fixed Corrected the Code Snippets table installer to always define the auto-increment ID as a primary key.
Earlier versions
- 5.1 (8 June 2026): 5 new, 13 improved, 2 fixed, 2 security
- 5.0.4 (28 November 2024): 1 new, 1 improved, 1 fixed
- 5.0.3 (25 June 2024): 1 fixed
FAQ
Is MainWP Code Snippets Extension free?
The code of MainWP Code Snippets Extension is licensed under the GPL, so anyone may use, change and share it. GPL 247 is a paid service: a plan or a purchase of MainWP Code Snippets Extension gives you the download and its updates. The developer's own support, licence key and online services are not included.
Which version of MainWP Code Snippets Extension is this?
Version 5.1.1, released 18 June 2026. New versions appear here when the developer publishes them.
How do I update MainWP Code Snippets Extension?
Install GPL 247 Updater on your site and paste your key from My Account. It installs new versions of MainWP Code Snippets Extension for you.






