A staging site or development site is a non-public version of the code that powers your live membership site. Your membership’s staging or dev site, if set up properly, will allow you to add and test new features before releasing them on your live site.

How to Safely Set Up a Staging Site

When setting up a staging site for a transactional ecommerce site, like a membership site, you need to be extra cautious. Whether you have a staging site already or are just considering setting one up, the setup guide we have available here outlines the best way to ensure your staging site does not do any of the following worst-case scenarios:

  • Your staging site cancels real member subscriptions at the gateway.
  • Your staging site ‘member’ data overwrites the live site, removing all new members (and their data) that have joined since the staging site database clone was created.
  • Your staging site data overwrites all the recurring order data for real members in your live site.

Note: WPVivid Backup/Restore v0.9.89 or older is not compatible for recurring membership levels and may cause premature cancellations when restoring a backup or creating a staging site.

Continue Reading: How to Set Up a Staging or Dev Site »

Detecting Site URL Changes in Paid Memberships Pro

Paid Memberships Pro v2.10+ includes a new feature to detect if the primary URL of your site has changed. When the plugin detects a change, automated services such as WP-CRON are automatically disabled.

Protecting Membership Sites From Irreversible Changes

We work with thousands of membership sites every year, and one of the most common issues we have seen people run into is this scenario:

  • The user sets up a staging site to test new features.
  • They keep the staging site connected to their payment gateway.
  • They start making changes to users, members, and membership levels.

So far everything sounds like normal and expected behavior. The issue that site owners run into is that they believe these changes are limited to the staging environment and won’t do things like:

  • Cancel real subscriptions at the payment gateway.
  • Expire or cancel real members and send them emails.

Some Reasons Why a Membership Site’s URL Could Change

Your membership site was initially set up at your primary URL (domain). During setup, you connected that URL to your payment gateway through settings like a Stripe Webhook or IPN. You also connected the site directly to the gateway through gateway settings like API keys and more.

Sometimes that URL gets changed, for reasons like:

  1. Staging or Development Sites: The primary site was cloned and the new site is meant for staging or development only.
  2. Moving to a new domain: You’ve intentionally changed the domain name of your website.
  3. Switching to a different URL scheme: You’ve added SSL and are now loading your site over HTTPS.

Since your membership site was initially set up for a different URL, this URL change is a strong indication that the PMPro plugin code should disable certain features and wait for further instructions or confirmations from you.

“Services Disabled” is automatically triggered when we detect a URL change.

Services Disabled notice and icon in admin area for PMPro
Services Disabled notice and icon in admin area for PMPro

What Happens When Your Services Are Disabled

When the site’s services are disabled, the code that triggers the following events are disabled:

  • Membership Expirations: Members with an expiration date are not expired. The system does not send any expiration email notices. The pmpro_cron_expire_memberships cron is disabled.
  • Membership Expiration Warnings: Members with an upcoming expiration date are not notified by email. The pmpro_cron_expiration_warnings cron is disabled.
  • Payment Method Expiration Warnings: Members with a soon-to-expire payment method are not notified by email. The pmpro_cron_credit_card_expiring_warnings cron is disabled.
  • Membership Trial Ending Warnings: Members that are in a trial period that is ending soon are not notified by email. The pmpro_cron_trial_ending_warnings cron is disabled.
  • Admin Activity Email: The site admin does not receive the notification email of membership site activity. The pmpro_cron_admin_activity_email cron is disabled.

How to Reenabled Services

If you see the warning message that we detected a Site URL change, your site’s services as described above are temporarily disabled. Here are the steps to turn automated services back on if you intentionally changed the Site URL or can confirm you are seeing this message in error.

  1. Locate the Site URL Change Detected warning message on any screen in the Memberships dashboard.
  2. If the notice is not visible, you can trigger it to display by clicking the “Services Disabled” link in any PMPro admin page near the plugin logo.
  3. Click the button “Update my primary domain and reactivate all services”.

The system will update the stored option pmpro_last_known_url  and reactivate all services.

Was this article helpful?
YesNo