Code Snippet extension - sync all the sites doesn't matter if only one selected

Hello MainWP Team,

Could you fix or improve the code snippet extension?
If you select just one site and run the snippet, it goes through all the sites!
You have to wait to see if it works… We have more than 150 websites so we have to wait a few minutes every single time…
Definitely needs to fix that. It is a very powerful extension and we love it but, this is becoming time-consuming which MainWP is not designed for, right?

Thanks, Fred

1 Like

Since the extension handles removing used snippets from child sites this process is required. Basically, if you load a code snippet and execute it, the extension goes through all sites to see if the snippet exists on sites that are not selected. If yes, the extension will remove it. This is why it’s required to loop through all sites.

However, I do see how this tedious can be for users with 100+ sites, so we will review this and see what can be done.

For now, I will move this topic to feature requests section.


Same issue with the Boilerplate Plugin. MainWP needs a more efficient way of keeping client sites in sync.

Perhaps the client sites should automatically fetch settings and content from the Dashboard, rather than the current architecture which is a massive processing bottleneck.

So how do I execute a code snippet on a single site only, please?
I.e. I have just added a new site and need to install a code snippet which is (and should remain) present on a few other sites. I do not want to remove it anywhere. I just want to add it to that one site.

What type of snippet you want to execute on one site only?
Do you already have it in use on other sites?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.