Staging Sites

#Overview

WP Fusion has a few options for working with staging sites.

Generally speaking, on staging sites you would want WP Fusion to be active (so you can set up content rules and test access), but not syncing any data with your CRM.

The reason is, for example, if a WooCommerce subscription goes on hold on the staging site (because a payment was skipped), this could remove a tag that would then revoke access to the user on your live site.

#Manually enabling or disabling staging mode

Staging mode can also be manually enabled or disabled from the Advanced tab in the WP Fusion settings.

Check the box for Staging Mode under System Settings.

Staging mode can be enabled from the Advanced settings tab.

#Via wp-config.php

If you want to ensure your staging site is always in staging mode (without having to update the WP Fusion settings each time), the simplest solution is to add a line to the wp-config.php file on your staging site:

define( 'WPF_STAGING_MODE', true );

Add this line above the line /* That's all, stop editing! Happy publishing. */, and the site will stay permanently in staging mode.

#Automatic staging site detection

Similar to WooCommerce Subscriptions, WP Fusion will detect when your site URL changes, and if the site URL is different from the URL where WP Fusion was installed, staging mode will automatically be activated.

When staging mode has been activated due to a site URL change, a notice will be displayed at the top of the admin.

  • To keep WP Fusion in staging mode, click the X or the blue Quit nagging me (but keep staging mode enabled) button.
  • To disable staging mode and make the current site URL the “main” install URL, click Disable staging mode

WP Fusion will also always display a notice across the top WP Fusion settings page whenever staging mode is enabled.

If staging mode was activated due to a site URL change, it can be disabled here as well.

#How staging mode works

When staging mode is enabled, all normal WP Fusion features will be available, but no data will be sent to (or loaded from) your CRM.

In order to properly simulate access controls via tags, WP Fusion will save any tag changes to a staging_tags meta key on each user’s profile, as a cache.

New users who register will also be given a randomly generated staging_contact_id .

This means you can test the process of registering new users, applying tags, and using those tags to unlock content— without syncing any data with your CRM.

When staging mode is deactivated, the cache of tags will be removed (no changes will be synced to your CRM), and your users’ access levels will revert to what they were before staging mode was activated.

Note: Automatic enrollments into course or groups via linked tags are not supported in staging mode. This is to avoid altering the real enrollments of your real users when the staging site is copied back to the live site.

#Automatic updates on staging sites

WP Fusion is fully functional without an active license. It won’t receive automatic updates on your staging environment, but otherwise it will function normally.

If you need to get automatic updates on your staging site, the license system will automatically allow activation on any URL that matches one of these:

  • localhost
  • 10.0.0.0/8
  • 172.16.0.0/12
  • 192.168.0.0/16
  • *.dev
  • .*local
  • dev.*
  • staging.*
  • test.*
  • *.wpengine.com

If you need to receive automatic updates on different staging or test URL, contact our support with the URL you’d like enabled and we can manually put in an exception for you

Was this helpful?