How to move a WooCommerce Subscriptions site to a new domain and how it uses staging site mode

What happens when you move a WooCommerce with active WooCommerce Subscriptions?

WooCommerce Subscriptions knows when it was moved to a new domain and immediately stops all recurring payments on the newly moved site until manually reactivation. This way no double payments are triggered automatically.

Checklist for moving your WooCommerce Subscriptions site:

Tread carefully! A WooCommerce store with active WooCommerce Subscriptions is a complex structure. Expect trouble and always have a contingency plan that allows you to undo all of your actions so you can rollback when you hit a dead end. Do not undertake to move your site without thorough preparation.

How WooCommerce Subscriptions knows it is a staging site

Upon activation of the plugin WooCommerce Subscriptions immediately copies the siteurl value in wc_subscriptions_siteurl. When you move your WordPress site, the value in siteurl must be changed. If there is a mismatch in both values, WooCommerce Subscriptions knows it has been moved, thus triggering its staging mode and setting all payments to manual.

Upon your first arrival in the dashboard of your staging site you then see this:

subscriptions-duplciate-site-warning

Mind you the payments are set to manual only via the database, it does not alter these settings:

Screen Shot 2016-04-28 at 11.56.54

The settings are located at: /wp-admin/admin.php?page=wc-settings&tab=subscription

How you know WooCommerce Subscriptions in in staging mode

You can also check your WooCommerce System status under /wp-admin/admin.php?page=wc-status
Find the Subscriptions Mode value there. If this is what you see, Subscriptions Mode: x Staging, then WooCommerce Subscriptions is in staging mode.

 

UsioiTyLUXweb

No WooCommerce Subscriptions payments will be processed by this staging site now.

How to stop WooCommerce Subscriptions notification emails

Keep in mind though that your staging system still is sending out all WooCommerce notification emails. If you want this to stop as well, you will need to use a plugin such as:

Do not forget to revert this after you have deployed back to live.

Payments on live site not processing after re-enabling payments

If you have deployed your WooCommerce Subscriptions staging site back to live and have trouble with payment processing, you should check the following values:

  • siteurl
  • wc_subscription_siteurl
  • wcs_ignore_duplicate_siteurl_notice

All three values must match, in order for your payments to process correctly again on your live site. If not you need to edit them manually, here is how.

  • Copy the url from siteurl: lets say https://www.conschneider.de
  • check the value stored in wc_subscription_siteurl
  • if the wc_subscription_siteurl is different to siteurl we need to change it. The correct value for this column is the siteurl
    but with __ inserted into the middle of the string (this is so that stuff doesn’t break on WPengine 😉 ).
    Set the value to http://www._conschneider.de
  • check the value stored in wcs_ignore_duplicate_siteurl_notice is also set to the same value as wc_subscriptions_siteurl. If not correct it the same way.

Be careful! Tampering with your database can render your site useless. Always make a full backup of your database (and files) beforehand!

Further read How does Subscriptions handle staging sites? on WooCommerce.com.

Related Posts

Powered By Related Posts for WordPress

4 Replies to “How to move a WooCommerce Subscriptions site to a new domain and how it uses staging site mode”

  1. I have multisite/multi-lingual in wpengine. i.e. In Enlgish, In Italian.
    we have different URL for the both version. i.e. .COM & .it
    I have followed the steps you have mentioned still it’s displaying :STAGING MODE in “.COM” version.

  2. I did all that configuration, and my website still in staging mode. Do you know if is there something could be messing? I’m using a new domain name.

    – siteurl
    – wc_subscription_siteurl
    – wcs_ignore_duplicate_siteurl_notice
    Are all same here.

    If i change wc_ignore_duplicate_siteurl_notice to any value and try to enable automatic payments, nothing happens and warning still be appearing.

    1. Hi there,

      Looks like you have all the basis covered here. Other than the values named here which are the ones you recounted, I do not know of any you could check in addition. If all values check out, if all in your `wp-config.php`checks out, I would probably restart and move back to square one and then take it from there.

Leave a Reply

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