WPCode Logo

WPCode Blog

Everything you need to know about the WPCode plugin

New Productivity Booster: Deploy Code Snippets From The Library

New Productivity Booster: Deploy Code Snippets From The Library 

Since we launched the first version of the WPCode library with the ability to save snippets to a private library, we received numerous requests to add the capability to deploy snippet updates from the library to multiple sites.

I’m happy to announce that this powerful feature is now available on all WPCode Premium plans for new and existing users.

Manage Snippets Centrally for Multiple Sites

If you manage multiple sites, you are going to love this new feature. From now on, you can push updates to your snippets directly from the WPCode Library. This means that you no longer have to log in to each site and update snippets in multiple places. This is a huge timesaver.

Opt-In for Enhanced Control

We realize that this is a very powerful feature, and with great power comes great responsibility. This is why, as part of making this feature available, we expanded the way the library connection works to ensure that your site is always safe. A central part of this change is enabling you to choose whether you want to be able to deploy snippets to a site or not by opting in when you connect your site to the WPCode library.

Check the option to deploy snippets from the library to your site

To start using this feature, you will have to reconnect your site to the WPCode library and check the box that enables snippet deployment from the library to your site.

If you ever wish to disable this feature, you just need to reconnect your site to the WPCode Library and leave the checkbox unchecked.

We took extra steps to ensure that this integration is safe by design and that your site is never exposed due to the connection to the WPCode library.

Error Handling for Seamless Updates

You might wonder, “What if I deploy a snippet that throws an error and takes down one of my sites?”

We’ve got you covered! Our deployment process is built to run separately from your WPCode Snippets, so if the changes you deploy to your snippets throw a fatal error on your site, you can always deploy an update to fix it.

We also made sure that each change you deploy creates a new revision in your website’s revision history, clearly shown as a remote update so that you can see exactly how your snippet has been updated.

Revision history for remote deployment

How to Get Started

Follow the steps below or see this documentation article for more info.

  1. Update to WPCode v2.2.0 (or newer).
  2. Disconnect your site from the WPCode library if already connected. Simply go to wp-admin > Code Snippets > Settings and click on “Disconnect from the WPCode Library”.
  3. Click the “Connect to the WPCode Library” button.
  4. Check the option to “Enable pushing snippets from the library to your site”.
  5. Click the “Connect to WordPress” button.
  6. Done! You can now deploy snippets from the Library to your site.

To deploy a snippet to your site, simply go to one of the snippets in your library and click the “Add to Site” button. In the pop-up that shows up, you’ll see a list of all the sites that you connected to your account and checkboxes to deploy the snippet to one or multiple sites.

WPCode Deploy to site button on the Snippet Library

If you want to use this process for snippets added by others, simply make a copy using the Duplicate button to add it to your own snippets library.

A New Way to Manage Snippets

We added this feature to help you save time and manage snippet updates in a central place. Using this integration, you can update more than just PHP snippets but also any HTML or scripts from a central place, giving you endless possibilities to create frameworks that make your life easier.

Update to the latest version today and experience the convenience and power of effortless code snippet deployment. For more information, don’t hesitate to reach out; we’re always here to help.

Add A Comment

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our privacy policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.


Get WPCode

Popular Resources

Get free tips and resources right in your inbox, along with 500+ others

Follow Us

Get Started Today & Add Your Own Snippets

Future-proof your website with WPCode Snippets and improve the way you manage code across all your websites.