MainWP Code Snippets Extension
Antivirus scan
Powered by ClamAV
✅ Verified clean
This product file has passed our security filters.
Want to run a fresh ClamAV scan right now? Takes a few seconds and shows scanner version, signature DB and live result.
This can take 5 to 30 seconds.
Clean file Threat detected
No threats detected in this file.
- File
- Size
- Scanned
- ClamAV
- Signature database
⚡ Powered by ClamAV
Scan could not be completed
Report product
If you detected an issue (broken file, malware, inappropriate content, etc.) let us know and we'll review it ASAP.
Sign in to report
About MainWP Code Snippets Extension
The same code change on twenty sites, twenty different logins
When a client asks you to block the file editor, raise the memory limit or create a redirect, the change is three lines long. What eats your time is logging into every site, opening functions.php or wp-config.php, pasting the code and hoping nothing breaks. With a portfolio of sites, that routine swallows the afternoon.
MainWP Code Snippets Extension is a MainWP add-on that lets you write, save and run code snippets from your MainWP Dashboard on your Child sites.
Your real risk is code nobody remembers pasting
For a maintenance agency, the underlying problem is usually not writing the snippet, but knowing six months later what code runs on which site and who added it. Snippets scattered across child themes and configuration files become invisible debt. Centralizing them in the Dashboard gives you one place to look and reuse from, instead of reconstructing from memory what you did on each site.
Three ways to run code with MainWP Code Snippets Extension
The extension offers three modes, and it pays to choose well because they are not interchangeable:
- Execute on Child sites: the code works as if you had added it to the Child site's functions.php. Useful for adjusting settings, cleaning up trash, creating redirects or extending features, like mini plugins.
- Retrieve information: you run a snippet to pull data from the sites, for example the number of posts.
- Modify wp-config.php: adds code to each site's configuration file to control WordPress settings.
You can also save your most-used snippets and reapply them, and run them on several sites at once.
WordPress hardening with snippets
The uses include disabling theme and plugin editors, blocking core updates, changing the autosave interval, preventing external requests, raising the memory limit and protecting against malicious URL requests. It all depends on the code you write.
It has no code library and does not review what you paste
The extension is the vehicle, not the content: you have to supply or write the snippets yourself. It also does not validate that the code is safe. The developer is not responsible for the code you run, warns that it must be used with great care and recommends testing it first on a test site. It is also an add-on for the MainWP Dashboard: it does not work on its own.
Frequently asked questions before you decide
Can I modify the functions.php of the Child sites?
Yes. With the option to execute on Child sites, the code acts as if it were in that file, without you having to open it.
Can I edit wp-config.php?
Yes, there is a specific option to add code that modifies that file on the Child sites.
Can I save my snippets to use them again?
Yes. You can save the ones you use most and reapply them on other sites.
Test each snippet on a staging site before launching it across your whole portfolio
A syntax error in wp-config.php or in PHP code run on many sites at once can take several websites down at the same time. Start with a test site connected to the Dashboard, check the result and only then run it on the rest. Back up the sites before touching the configuration, and save as a reusable snippet only what you have already verified.
Version history
-
v
5.1.1 Current 19 Jun 2026
-
v
5.0.4 8 Jan 2025
Customer reviews
Sign in to leave a review. Only people who have the product can review it.
No reviews for this product yet.
Frequently asked questions
-
GPL (General Public License) is the license under which WordPress and most premium plugins/themes are distributed. It grants you the right to use, modify and redistribute the software in as many projects as you want, with no domain restrictions.
-
Yes. With membership you get automatic updates via our GPLClub Updater plugin (installed on your WP, detects new versions and applies them). With individual purchase, you get one year of manual updates from your account.
-
Depends on the plan. Monthly: 3 domains. Semi-annual: 7. Annual and Lifetime: 15. Individual purchase: 1 domain.
-
GPLClub offers its own support for installation, configuration and compatibility. For direct support from the original author (feature requests, product-specific bugs), a license purchased from the author is required.