Update: as of Aug 21, 2012, the Scandle Candle site below is no longer using WooCommerce. I was never able to successfully upgrade to WooCommerce v2.0 so we moved it to BigCommerce.
Since Woocommerce seems to be a popular topic on my blog, I thought I’d follow up with an update to my original Woocommerce Post and discuss some of woocommerce v2.0 challenges I’ve faced recently.
I hadn’t been following the progress of the big wocommerce 2.0 release but late Monday night I noticed that my Scandle Candle wordpress dashboard was notifying of an upgrade for woocommerce plugin so I upgraded and went to bed without much thought. I woke early Tuesday and checked the site only to find v2.0 had caused a number of issues. All my prices on the products were marked as “free”, the product detail page layout was hosed and worst of all, I could no longer access the “products” page in the dashboard.
With some quick preliminary searches I found Woo had a list of suggestions to prepare your site for wocommerce v2.0 as well as testing it in a separate environment. I knew at that point I was screwed since it was obviously a big update with major database changes. I knew even if there were problems with woocommerce v2.0 it would be days before a new version was released so I decided the best solution was to roll back to an earlier version of the site then try and convert to woocommerce v2.0 with a proper testing environment.
Unfortunately, my BackWPup quit working recently when I upgraded that plugin to 3.0 so my most recent backup of the site was a couple weeks old. I was able to export the most recent orders and posts from the bad woocommerce 2.0 install. I moved the backup files from my S3 backups to the AWS server and unzipped them into the wordpress directory. I deleted the database and uploaded the most recent database file then launched it and imported the most recent recent orders and posts using the wordpress importer. It wasn’t actually this easy as it took me a few hours to work though all the details.
once complete I ensured all my themes and plugins were updated, other than the new Woocommerce v2.0 update. Come to find out, my woo theme updater wasn’t working as I was on an old version of my shelflife theme. I took a snapshot of the AWS image and launched a new instance of the server to test the wocomemrce 2.0 upgrade. Still no luck as the woocommerce v2.0 version was missing a good deal of the main page of the site and the products page in the dashboard still came up as a file not found. I decided to stick with my old version of woocommerce until they get the bugs worked out. I’ll try the upgrade again (in a test environment) in a few months.
During all these changes I noticed the site was getting very slow so I upgraded from a micro to a small EC2 instance. Didn’t seem to help much so I reinstalled the W3 Total Cache plugin and allowed it to self-configure. Slightly faster but not great so installed WP Optimize and had it remove thousands of post revisions. A bit better but not great. Finally, I removed Simple 301 Redirects and that seemed to do the trick as it was much faster now. I was using the 301 plugin redirect when we moved from the old site structure to the new site about a year ago so we shouldn’t need it any longer. The site responded so much better that I moved the image back to an EC2 micro instance.
Unfortunately, BackWPup still isn’t working on the site as the BackWPup menu items simply never show up in the dashboard. So I moved to UpDraftPlus for the time being. Not quite as customizable but I’ll try BackWPup again in the future to see if they get it working.
Note to self, don’t perform major (database-altering) plugin upgrades without testing it in a separate environment first. Fortunately AWS makes this fairly easy with minimal user impact if you know how to create an AMI, launch it and move elastic IP around. Also, make sure you have recent backups (database AND files) whenever you upgrade any plugins.
In the process I did upgrade the server that hosts this CassidyLackey.com site (with about a half-dozen other WP sites) from an EC2 micro to a small instance. Apparently the BackWPup backups were failing on this server because there wasn’t enough memory to run the full backups on the micro instance. The traffic on these sites had grown enough to justify the bigger server anyway.
Update at 1pm on 3/6/13 – The woocommerce order import process using the standard wordpress import/export function wasn’t such a great idea. It apparently doesn’t include the order line items (products) with the order XML so you basically just get a skeleton order. Fortunately it was just 4 orders and I created a dump of the original mysql database before rebuilding it. So, I edited the SQL file from the original database and located the line item IDs and associated product IDs then added them manually.