WooCommerce Subscriptions is a premium WooCommerce extension
This guide provides instructions to safely upgrade major versions of the WooCommerce Subscriptions plugin. While many of these steps are not necessary most of the time, it is always safest to follow these steps when upgrading to a major new version. By following these instructions carefully, you will prevent issues and interruptions to your store.
If you are a developer who needs to update custom code to work with Subscriptions v2.0, please refer to the Developer Overview of Subscriptions v2.0 Architectural Changes and Payment Gateway Upgrade Guide for a technical overview of the changes.
Step 1. Before Updating
↑ Back to topWooCommerce Dependency
↑ Back to topUpdate Other Plugins Too
↑ Back to topCreate a Backup
↑ Back to top- BackupBuddy is a very popular backup and migration tool amongst our customers.
- ManageWP does a lot more and is especially useful if you manage multiple websites.
- VaultPress is the full backup service by Automattic.
Step 2. Create a Staging Site
↑ Back to top- Site Ground
- Page.ly (SkyVerge published a great guide on how to create a staging site with Page.ly)
- WP Engine
Step 3. Test Subscriptions on Staging
↑ Back to topStep 3.1. Install the Latest Version of Subscriptions
↑ Back to top- Go to your WooCommerce.com > My Account > Downloads page
- Click Download next to WooCommerce Subscriptions
- Go to the WordPress Administration dashboard on your staging site (e.g. www.example.com/wp-admin/)
- Uninstall the active version of Subscriptions plugin by following the instructions for manually uninstalling a WordPress plugin
- Install the plugin with the zip file you downloaded from WooCommerce.com by following the instructions for manually installing a WordPress plugin
Make sure the new folder has the name /woocommerce-subscriptions/, or else some other extensions might not work.
Step 3.2. Run the Upgrade Process
↑ Back to topThe database upgrade process is not necessary with all new versions of Subscriptions. For example, while version 2.0 required a database upgrade, version 2.1 did not.
Upgrade Logs
Subscriptions keeps a log of everything it upgrades during the process. If you need to contact support about issues with the upgrade, please include this file with the support ticket. It can be found under the file path:/wp-content/uploads/wc-logs/
in the log file beginning with wcs-upgrade
.
This log file will automatically be deleted a few weeks after the upgrade has completed successfully.
Upgrade Process Design
The batch size for each upgrade will be between 35 and 50, depending on the number of subscriptions on your site (the more subscriptions the smaller the batch size). By upgrading the data in small batches, the upgrade process is slower than doing one large database query or processing larger batches, but it is also more reliable. Specifically, small batches prevent timeout or memory exhaustion errors on the many varieties of possible server configurations. Because upgrading small batches can be slow, the upgrade process is written is such a way that only administrative users are blocked from accessing the store while the upgrading is in progress. Customers, non-logged in visitors and other non-administrative users on your site can continue to browse and even purchase products (including subscription products) from your store while the upgrade is in progress.Step 3.3. Test WooCommerce Subscriptions
↑ Back to topAdministration Screens to Test
These are the most important administration screens you should visit in order to check that features are working:- WooCommerce > Subscriptions: the main subscriptions page. Here you should see all of your existing subscriptions in the new table design.
- WooCommerce > Subscriptions > Add Subscription: on the administration screen above, click the Add Subscription button to load the new Add Subscription administration screen. Create a new subscription with products, taxes and shipping. Set the subscriber’s billing and shipping address and a billing schedule to test out the new feature and ensure it works with all of your existing plugins.
- WooCommerce > Subscriptions > Edit Subscription: on the subscriptions administration screen above, click the ID of a subscription under the Subscription column to load the new Edit Subscription administration screen. Here you may be able to modify an existing subscription, depending on whether the payment gateway used to purchase the subscription supports modifications.
- Now visit other administration screens, like the WooCommerce > Orders, WooCommerce > Orders > Edit Order and WooCommerce > Settings > Subscriptions screens to ensure that everything is working correctly.
Front End Pages to Test
After you have tested the administration side of your site, you should test the customer-facing side of the site too. The most important front end customer interactions to test are:- Purchasing subscription and non-subscription products via your store.
- Viewing and managing a subscription via the My Account page for a customer. You should pay particular attention to the new View Subscription page. Go here to test suspending and reactivating a subscription and try to change the address or payment method on a subscription or upgrade/downgrade a subscription item.
Step 3.4. Report Issues and Get Support
↑ Back to topStep 4. Update Subscriptions on Live Site
↑ Back to topUpgrade Paths for Very Out-of-date Versions
↑ Back to top- Upgrade Subscriptions from 1.4.2 to 1.4.7 (which includes full compatibility with WC 2.1)
- Upgrade WooCommerce from 2.0.x to 2.1.12
- Upgrade Subscriptions from 1.4.7 to 1.5.10 (which includes full compatibility with WC 2.2)
- Upgrade WooCommerce from 2.1.12 to 2.2.11
- Upgrade Subscriptions from 1.5.15 to 1.5.19 (which includes full compatibility with WC 2.3)
- Upgrade WooCommerce from 2.2.11 to 2.3.13
- Upgrade Subscriptions from 1.5.19 to 1.5.29 (which includes full compatibility with WC 2.3)
- Upgrade WooCommerce from 2.3.13 to 2.4.13
- Upgrade Subscriptions from 1.5.29 to 2.0.9 (which includes full compatibility with WC 2.5)
- Upgrade WooCommerce from 2.4.13 to 2.5.5
- Upgrade Subscriptions from 2.0.9 to 2.0.15 (which includes full compatibility with WC 2.6)
- Upgrade WooCommerce from 2.5.5 to 2.6.14
- Upgrade Subscriptions from 2.0.15 to 2.2.8 (which includes full compatibility with WC 3.0)
- Upgrade WooCommerce from 2.6.14 to 3.0.5
- Upgrade Subscriptions to the latest version
- Upgrade WooCommerce to the latest version
Downgrading Subscriptions
↑ Back to topThis section applies to downgrades between major and minor versions only.
Some upgrades include data migration routines which change the way data is stored in the database. This means that when the software is updated, the database is updated as well. If a good upgrade routine is maintained, both types of upgrades should happen smoothly and there should generally be no need for downgrades.
There are times, though, when it may be desirable for a site manager to downgrade Subscriptions from the current version to a previous version. Perhaps there is an error occurring in a newer version that was not present in the previous version. However, downgrading is not without risk.
When Subscriptions is upgraded, there may be a database upgrade that takes place as well. This would occur with minor releases, meaning the second number in the version changes. For example, a minor release would be from version 2.2.n to 2.3.n. This also applies to major releases, meaning the first number in the version changes. For example, a major release would be from 2.n.n to 3.n.n. After upgrading from one minor or major version to another, a database update may have taken place as well. The process of downgrading can cause problems because the database version is now greater than the software. Downgrading the software version does not downgrade the database version.
In order to bring attention to the possibility for issues brought by having differing database and software versions, Subscriptions will display a notice when the database version exceeds the software version. If a downgrade occurs between minor releases, for example, from version 2.3.5 to version 2.2.19 and the database version is now greater than the software version, this notice will appear.
This does not mean that there are errors, but that this type of downgrade raises the possibility for errors. The exact nature of the issues for each particular downgrade cannot be known without some investigation. For this reason, the notice appears as both a warning and a resource to get help if issues arise by opening a support ticket.