I’m going to be stepping through how to perform a minor Plugin update of WP e-Commerce, that is, from 3.8.5 to 3.8.6. I’m not even going to try covering the major Plugin update from 3.7 to 3.8 series in this tutorial so don’t ask.
It’s been some time since I’ve written a detailed tutorial! This should be fun. I could go off on a tangent and explain what makes WP e-Commerce different to other WordPress Plugins but we’ll save that for another post. Let’s get started!
To update WP e-Commerce safely we’ll break this process into 3 steps:
- Backup database and site files
- Update WP e-Commerce on staging.domain.com
- Update WP e-Commerce on www.domain.com
Backup database and site files
Firstly you’ll want to back up your currently operating store, that means database and site files. This is a preventative message, in case something – anything… – goes wrong, with store updates always assume the worst.
I prefer WP-DB-Backup for database backups as it lets you explicitly include/exclude tables. To take a backup of site files I use the file manager that comes with Plesk/cPanel X to ZIP all site files under the web directory.
Store the backups locally on your workstation as well as a remote/external storage source (I use my flash drive or laptop, you could use Dropbox or Amazon S3) then delete any backup files created within your hosting account… you’d hate for anyone to download your site backup so mitigate the risk altogether.
Update WP e-Commerce on staging.domain.com
I’m going to assume you know what a ‘staging site’ is, and have one set up for your WP e-Commerce store. I won’t be covering installing and setting up a WordPress staging site in this tutorial.
Ever since the early 3.7.x Plugin updates I’ve manually merged changes from the latest Plugin update against the existing Plugin on the live site, this in the past had been due to custom Plugin changes requiring me to do so, though I still do this out of habit with the 3.8 releases as it’s a great way to familiarise yourself with changes in each release.
Head over to the Plugin page for WP e-Commerce on WordPress.org and download the latest stable release (as of writing this is 3.8.6). Extract the Plugin files to a common directory on your local machine, add a ‘_3.8.6’ to the name of the ‘wp-e-commerce’ directory. After this pull down a local copy of your current WP e-Commerce Plugin files with your preferred FTP Manager from your staging site to the same common directory.
To compare changes between each Plugin release I use Beyond Compare – and have for years! – by selecting both directories and hitting Compare. Once the changes in the new Plugin update have been merged with the staging site version send it back up to the staging site.
Test, test, test. I’ve made a checklist below that I follow before signing off on each Plugin release.
- As an Administrator go through the Sales process, from start to finish.
- Create a sample Subscriber user account and go through the Sales process, from start to finish.
- As a guest/site visitor go through the Sales process, from start to finish.
- Ensure shipping calculators/rules and payment methods are in working order.
- Ensure the Your Account section works, including Purchase History, Your Details, Your Downloads.
- Ensure Purchase Receipt/Admin Reports are being issued and received by both store owner and more importantly the customer.
If you have additional steps that aren’t mentioned above please drop them in the Comments form below, I’d love to add them above.
Update WP e-Commerce on www.domain.com
If you’re a full time worker and it just happens to be a Friday you can read this on Monday, don’t upgrade on Friday’s, ever.
[Later on Monday] Once your staging site update has been given the all clear you’ll want to temporarily close the shop to avoid site visitors seeing any sightly PHP errors or ‘blank screens’. I do this in the following order.
- Display a notice in the header of the store that maintenance is pending, or about to begin. I like to use the default ‘yellow bubble’ styling that’s common in WordPress.
- From the WordPress Administration enable Maintenance Mode and use a custom 503.php template file within the active Theme directory.
- From the WordPress Administration disable WP e-Commerce from the Plugins page and then using your preferred FTP Manager delete the Plugin files from ‘/wp-content/plugins/wp-e-commerce/’.
- Send the Plugin copy from your staging site to to the live site now then re-enable WP e-Commerce from the Plugins page within the WordPress Administration.
- Take down the Maintenance Mode as well as notice on the site header.
Just as before… test, test, test. Re-do the above steps covered in Update WP e-Commerce on staging.domain.com.
There are likely services set up on your live site that aren’t on your staging site so go through each of them to ensure a pain-free Plugin update. For instance, if you have Google Analytics e-Commerce Reporting you’ll need to generate a Sale and check the HTML markup of the Transaction Results page.
Hope this helps! Drop questions, suggestions or improvements below. 🙂