Last updated on April 1, 2020
Here’s my own – nightmarish – story of updating WordPress – and lessons learnt. I’ve also included some guidelines near the end, so you don’t get into a situation like us!
It was all going well…
You may know that we have an e-commerce analytics business – Putler. We use WooCommerce and Subscriptions extension along with many other plugins to run it’s backend. We use our own plugin that syncs WooCommerce data with Putler, so I get all the advanced reporting within Putler.
I built the Putler site about three years ago, updated it 3-4 times after that and things were working smoothly. So far, so good.
One day a client said he was not able to login to Putler, despite an active subscription.
While it sounded strange, that was indeed the case. His PayPal subscription was active, we were getting monthly payments, but within WooCommerce his subscription showed as “payment not received” / “pending cancellation”.
We couldn’t find a specific reason for this to happen, so termed it as an exception, and manually marked his subscription “active”.
Couple of days later another subscriber raised similar issue. We manually corrected that too, and asked our server admin to look at any issues on the server.
Server admin said everything is fine. We were receiving payments just fine, most subscriptions were showing as active within WooCommerce.. So I shrugged and dismissed it as a “temporary” issue.
Business in jeopardy…
A week later while I was reviewing monthly revenue numbers, it hit me that our month on month revenue was down by 20%. That’s unusual for a recurring business, so I started looking at the orders closely.
Turned out that for last two weeks, many recurring orders were not processed. PayPal was sending notifications for successful payment receipt, but they failed to link with actual subscriptions in the system. Eventually these subscriptions were getting cancelled because of overdue payment.
Subscriptions getting cancelled automatically is a big problem. If we did not find and correct this, we’d lose all business since the system will cancel every subscription in due course.
We were on fire.
Who’s to blame?
Immediately, we fixed the blame on Subscriptions plugin. We had updated it a few days ago and we thought the new version is breaking it. We started extensive debugging and went through PHP error logs, WooCommerce logs, IPN logs and what not. We could reach the exact function at which this was breaking. Whenever a PayPal notification was received, the processing went fine until a point, and then everything went silent.
I was furious. Started cursing the Subscription plugin and Brent. Brent Shepherd of Prospress – the makers of the Subscriptions plugin – is a good friend actually, hence blaming him was easy!! 😉
Then I thought of taking his help – he is a friend after all. So caught up with Gabor Javorszky (from Prospress) on Slack and described our problem. He said PayPal issues are common and asked me to send all the logs. He also suggested that another plugin could cause the problem.
It was already two weeks after getting the first complaint, and nearly a month from the beginning of the problem. I escalated the issue to highest priority and asked for an extensive audit of everything.
Two days later we found the real culprit.
What a shame…
It was the WooCommerce Putler Connector plugin. One of our own plugins.
As a matter of fact, the last update to the connector plugin solved this exact problem. We did not update to the latest version on our own site!
That was bigger shame!!
We lost a good chunk of revenue, two weeks of time, and many paying customers just because we missed a plugin update. And if we couldn’t solve the problem sooner, the damage would be severe.
Yes, we’ve all had instances when things turned bad right after updating WordPress core, plugins or a theme. We have seen the “white screen of death”. We’ve faced crisis on live websites after performing an update.
But that does not mean we can leave our sites without updates.
And yeah, don’t jump to conclusions! (Sorry Brent!)
Update Dilemma: To Be or Not To Be??
Performing an update on your live site can be dangerous. Not updating your site can be equally – if not more – dangerous. So what do you do?
First, let’s recap why we should keep our site up to date…
- Security updates – sure, we don’t want to get hacked
- Bug fixes, compatibility updates – we need these too
- New features – can be very helpful, can save time
- Support – most premium plugins provide support for paid users only
Now let’s look at why we don’t update our sites:
- Frequent updates – some or the other thing is always getting updated!
- Lack of time – busy with other responsibilities, updating multiple sites can be very time consuming
- Risk of an update breaking the site – a major update will certainly require testing before going live, a minor update too can bring a site down
- Developer not available – if someone else is managing your site, their availability and cost will also be a factor
- Site’s live; If it ain’t broke, don’t fix it – makes sense – or does it?
Ultimate Guide to updating WordPress – core, plugins and themes
So how should one approach updating WordPress?
Here are some guidelines we’re following ourselves:
- Take regular backups – of both WordPress files and database
- Review changelogs to determine if it’s a minor update or major
- If it’s a minor update, go ahead and do it (still, backup first)
- Update one plugin at a time
- Test anything major on a staging server before trying on live site
- Confirm the update went well
- If there is any custom code, ensure it’d work with new version before updating
- If using a child theme, never update parent theme on live site directly. Test first on staging environment.
- WordPress core updates are generally safe!
- WooCommerce upgrades should be done after ensuring WC plugins you use are up to date. Better to test on local / staging environment before going live – especially between major updates.
- Never store your backups in wp-content or even public_html folder
- We can minimize impact by performing updates regularly
Some excellent articles about performing WP updates:
- Ultimate Guide updating WP and Multisite on WPMU Dev
- A guide to updating WordPress on SitePoint
- Upgrading WordPress – extended instructions on WP Codex
- How to update WP themes on Design Wall
Share your stories / best practices…
Hopefully my story helps you avoid such problems for yourself.. Update often, update carefully!
Do you have any horror stories about updating WordPress? How did you recover from them?
What are the “best practices” do you follow now to update WordPress / WooCommerce / Plugins / Themes?
Share them by posting a comment below! Your comment will help many others.