Introducing Code Snippet Manager: Free Yourself From Manual, Repetitive Tasks

Save 4+ hours per site, every week.

Get a quick demo of how it works, and unlock an exclusive discount while you’re at it.

If you’re managing multiple sites, you’ll relate to this.

Last month, a leading US agency came to us with a problem. There were a bunch of small tasks that felt trivial on one site, but painful across 50 or 100.

Very often, you need to check or change the same thing across multiple sites, like:

  • Has Rank Math set Pages to “Noindex” somewhere it shouldn’t
  • Rolling out the fix for a bad plugin update across multiple sites
  • Changing users or license keys across multiple sites

Code Snippets were perfect for such small automations, but running them across multiple sites was risky. One typo could spiral into two hours of damage control.

Now, at WP Remote, our job is to make your job easier. So we got down to work, and in record time, are happy to share the new Code Snippets Manager.

Using this, you can:

  • Paste your snippets and select the sites to run them on
  • Narrow down sites using clients, tags, plugin or PHP versions, site health, and more
  • Validate any syntax errors before it goes live
  • Take an automatic backup before making changes
  • Monitor exactly what happened on each site, including errors and outputs
  • Check execution and version history, and restore versions when needed
  • Save and reuse snippets from the encrypted library so your credentials, etc stay safe

Ok, but where do I get the snippets?

The easiest way now is to just ask ChatGPT or Claude. 

Describe exactly what you want to check or change, tell it that the code will run inside WordPress, and ask it to explain what the snippet does before you use it.

You also don’t need to write everything from scratch. You can find free examples in WordPress Dev Resources or public libraries and use them as a starting point to:

  • Disable Elementor’s default fonts and colours across sites where you want the theme to control styling instead.
  • Exclude Gravity Forms or Stripe from caching if they’re interfering with forms or payments.
  • Test wp_mail across a batch of sites after a migration or hosting change to quickly find which ones can’t send email.
  • Generate reports of recently updated content before a migration or client handoff, so you know what changed most recently.
  • Check PHP and WordPress memory limits when you’re debugging a site.

Always test snippets once before rolling them out. Some are designed to stay active as a plugin or mu-plugin, so just ask ChatGPT or Claude to adapt them for the one-time check or change you want to run.

Now let’s use an actual example

Say you’ve just taken over 25 new sites from another agency.

One of the first things you may want to check is whether the WordPress Administration Email still points to them. WordPress exposes this as the admin_email option, so it’s a very simple thing to check with PHP.

Create the snippet with ChatGPT or use the WordPress documentation as your starting point, then paste it into WP Remote.

Give it a useful name like Check Admin Email, select the 25 new sites, and check the syntax.

For a large portfolio, you don’t have to work through one long list manually either. You can narrow the sites down using groups such as clients, tags, plugin or PHP versions, and site health.

WP Remote checks the PHP syntax without running the snippet.

This first snippet is only checking a value, so there’s no reason to take a backup. Run it once, and you’ll get the result back separately for every site. Maybe 19 sites already have the right address, but 6 are still pointing to the previous agency. Now you know exactly which six need changing.

Next, paste a code snippet for updating the WordPress Administration Email to the address you want.

Then select the six sites you want to change this on and take a backup before rolling it out. WP Remote validates the PHP first, takes the backup, and then runs that exact change across the sites you selected. That’s it!

If something fails, you’ll know exactly where

This is where doing the same thing across multiple client sites normally gets time consuming. Maybe the snippet updates four sites perfectly, but two behave differently because of their setup.

WP Remote doesn’t just give you one big “completed” message.

You can see the result for every site separately — which ones succeeded, which failed, and which are still running. And when something does fail, you can open that site and see the actual error, output, or value returned by the snippet.

So instead of discovering later that two sites didn’t change, you know exactly where the problem is while you’re still doing the job. 

You can also cancel an execution that’s still running if something doesn’t look right. And when you need to investigate something later, you can filter execution history by snippet, site, status, or date instead of digging through every previous run.

Save the workflow for next time

Now you have two useful snippets: a) Check Admin Email and b) Update Admin Email

You can save them in WP Remote’s central library, so the next time you take over another batch of client sites, you can search for them and run the same workflow again. 

And if you improve one later, you don’t lose the version you already know works. Previous code versions are retained, and you can restore an earlier one when needed.

You can also look back at previous executions to see where a snippet was run and what happened.

Finally, snippets sometimes contain things you really don’t want sitting around in plain text, like API keys, access tokens, credentials, or sensitive values returned during execution.

So both your saved code snippet and its execution results are stored encrypted.

Our support team is happy to help you get started, so if you have any doubts or even ideas for how we can make this better, do email us at support@wpremote.com 

Tags:

You may also like


How do you manage your websites?

Managing multiple WordPress websites can be time consuming and error-prone. WP Remote will save you hours every day while providing you complete peace of mind.

Managing everything yourself

But it’s too time-consuming, complicated and stops you from achieving your full potential. You don’t want to put your clients’ sites at risk with inefficient management.

Putting together multiple tools

But these tools don’t work together seamlessly and end up costing you a lot more time and money.