Posted on

WordPress Plugin Update Nightmares (my own story) and solutions

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.

Something’s broken…

Something's broken...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.

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.

Shame!!

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!!

Lesson learned…

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?

To Update or Not to Update?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?

Look Here!!

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:

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.

Image Credits: Helgi Halldórsson, Pixabay, Wikimedia, Giphy

3 thoughts on “WordPress Plugin Update Nightmares (my own story) and solutions

  1. Hello Nirav, well written blog… i too have come across these problems and of course due to the nature of the ‘openess’ of WordPress we rely heavily on things not breaking but as you see things do go wrong that can lose business.

    Its funny i just watched a movie called ‘The Intern’ great movie i highly recommend it, there was a part that spoke about how a broken ZOOM function of the Ecommerce site had an effect of 20% loss of sales. Just because people couldn’t zoom in. I see the truth in that…..

    As you said working in stage is a safeguard, but guess what its probabaly not enough.

    Imagine how much testing would need to happen to be 100% sure that a plugin does not break some sort of functionality especially if your using, lets say 15 plugins.

    The time it would take to enable or update each one and perform a series of checks could easily take half a day or more and because of the velocity of updates these days its almost a job on its own. I almost think its impossible to keep up.

    To be honest i dont think there is a 100% foolproof solution you can only do the best you can.

    My tips would be the following

    1. Minor core updates are safe, major core update are generally safe
    2. Woocommerce updates are almost NEVER safe these days, something will go wrong even if its at a theme level, this is especially true if your using and relying on premium themes. If your doing a WC update make sure the theme and WC related plugins are compatible with the WC version your installing or your asking for trouble
    3. In a staging environment i would probabaly update most if not all plugins at one time to save the time and energy and see if anything breaks, do test orders or other potential money loss actions and see if they work. If all good push to live
    4. If a major update has happened you can engage a company such as https://www.usertesting.com/plans and get real people to do some testing for you on different functions…… get them to do the bug finding for you 😉

    Thanks for your post. It was enjoyable to read
    Mitch

    1. Hey Mitch,

      Thank you for sharing your experiences.

      You’re right that there is not 100% foolproof solution, but you also very rightly said that it’s important to test orders & other potential money making actions before going live.

      These tips will definitely help other business owner.

  2. You are absolutely right. Sometimes i am torn between whether to update or not to because the updates keep coming in frequently. Thanks for your guidelines

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.