Editing and customizing a live website can potentially have disastrous effects. In this guide, we will cover a couple of reasons why you should consider using a staging environment for your online projects.

why you should use a staging site


What Is A Staging Environment

A staging environment is a replica of your production (live) website which does not alter real user data. Staging environments are not available to the public or search engines. These sites are used strictly for testing new features and changes before implementing them onto your live site.


Why Use A Staging Environment

It’s always a good idea to run a staging site, not just for WordPress websites but all sites. This will allow you to test custom code, new features or even bug fixes before implementing it on a live site with real data and transactions.

If your staging site has a fatal error from adding new code for that new feature you really need, it won’t be critical as your live site is untouched at this point and still receiving new transactions.


Features You Can Test On A Staging Environment

Since the staging site is an exact replica of your live site, you are able to test any feature your live site may offer. You are able to test the following Paid Memberships Pro features:

  • Payment issues in Sandbox mode.
  • Run through your checkout flow as a customer.
  • Custom code recipes.
  • New Add Ons (e.g. Multiple Memberships Per User Add On).

Getting Paid Memberships Pro Ready For A Staging Site

When copying your live site over to your staging site, all your user data and subscriptions will be duplicated. If you don’t obscure this data, certain actions may affect your live site. To stop this from happening you may do the following:

  1. Remove your payment gateway details from the Payment Gateway Settings page and set your payment gateway to “Testing Only”. Note: if you need to test something payment gateway related you may set up your gateway to Sandbox/Testing.
  2. Download and install the Developer’s Toolkit.
    1. Navigate to “Tools” and select “PMPro Toolkit Scripts”.
    2. Once on the PMPro Toolkit Scripts page, select the option that says “Scrub member emails and transaction ids.”
    3. Click save and the script will run to scramble the user data and transactions. (Check your WordPress user’s list to ensure their email and usernames have changed).
  3. Now you can adjust user’s membership levels or delete the users and it shouldn’t affect your live site data.

In the above case, you wouldn’t push your staging site to your live environment but replicate and copy over what you’ve done on your staging site to your live site.


Summary

In this article you should have a clearer understanding of why you should use a staging environment with Paid Memberships Pro and what settings to adjust when running tests on your staging environment. We will be covering a post in the near future on how to setup a staging environment with WordPress and Paid Memberships Pro.

Leave a Reply

For faster support related to issues on your specific site please open a ticket in our members support area.

Your email address will not be published. Required fields are marked *