Apr 22

What To Do When WordPress Plugin Updates Go Wrong

Wed, 04/22/2015 - 23:08 — julie

You have to love the fact that you can automatically update your WordPress plugins from within the admin. It turns what used to be a chore (uploading the updated files via FTP) into a nice neat process. Just a few clicks and you’ve got the latest and greatest versions installed. Except that, sometimes, a new version of a plugin may have an undesired effect on your site.

Those effects could be as small as a slight display issue that requires you to adjust some settings or CSS. They can also be so bad as to give you that dreaded "White Screen of Death" when trying to load your site.

Most likely, if you’ve used WordPress plugins for awhile, something similar has happened to you. If not, you’re either a) very lucky; or b) very careful.

Unfortunately, occasional problems are just part of the deal. WordPress plugins are built by authors who really do want you to have a great experience. That said, they are all human and have limited amounts of time to spend on their plugins. Plus, it’s essentially impossible to make sure that every conceivable configuration a site owner could be running works without a hitch.

But the good news is there are things we can do to fix these problems and even prepare for them. Let’s take a look:

Setup a Staging or Local Environment

What’s a staging environment? It’s essentially an exact copy of your website (database, themes, plugins, media, etc.) that you can use for testing purposes. For example, you might use a staging environment to ensure that the newest version of WooCommerce works with your site. You can upgrade WooCommerce to the latest version and thoroughly test your site to ensure everything works as it should. The key aspect of this is that you’re testing away from public view. So, even if something breaks upon an upgrade, you won’t have to worry about your site’s visitors seeing it.

Staging environments are provided by some web hosts. If yours doesn’t offer this functionality, you can create one yourself or use a local staging environment on your computer running software like WampServer (for Windows) or MAMP (for Mac).

While I fully realize not everyone has the ability to do this, it is highly recommended to have a staging server for your site. If you’re not sure where to start, there are some great tutorials available.

Back It Up

If you don’t have a staging environment, back up your database and the contents of your /wp-content/plugins/ folder before performing updates. This is especially important if you haven’t updated your site in awhile.

This will enable you to easily replace a troublesome plugin with the previous version. Most of the time, this will get you out of a jam. However, there are the occasional plugin updates that also make significant changes to your database. If that’s the case, you can restore your backed up database, then roll back the plugin to the previous version.

If you’re looking for a good and reliable WordPress backup plugin, CodeCanyon has a great selection.

Fixing a Stalled Update

You may have noticed that, while updating a plugin, theme or WordPress itself, the frontend of your site will display a message stating that it’s briefly ‘unavailable due to maintenance.’ Once the update is completed, everything goes back to normal. Except when it doesn’t.

Once in awhile, the updating process may fail. This leaves both the frontend and backend of your site inaccessible. Thankfully, there is an easy fix when a plugin update fails.

Simply FTP into your website (or use your web host’s file manager) and navigate to the folder where WordPress is installed. Look for a file called ".maintenance" (notice the "." in the file name) and delete it from the server.

Now, refresh your browser and you should be able to access everything once again. Take a look around and make sure that everything is working properly. You can then try to run the update process again.

Finding the Bad Apple

Ideally, we would all be thoughtful enough to only update one plugin at a time, test the site and repeat. That’s probably not the way most of us (including myself) work. We’re busy and we just want to get things done as quickly as possible. Most of the time we don’t experience problems.

When there is a problem, we need to retrace our steps a bit. The old standby method of doing this includes:

  1. Deactivating all plugins (or at the very least, the ones that were just updated).
  2. Enable a plugin, test the site and repeat (what we should have done in the first place, ha!).
  3. Once you’ve found the offending plugin, you can (hopefully) roll back to the previous version by deleting the new version via FTP and uploading the older version in its place.
  4. Beware of any database upgrades that may have occurred during the upgrade. They may require you to restore a database backup.

Tip: If you need an older version of a plugin in the WordPress Plugin Repository, you can usually grab one by clicking on the Developers tab on the plugin page.

Wrapping Up

The bottom line is that, while updating a plugin has never been easier, we still need to be conscious of the fact that bad things can happen when we least expect.

In most cases, there is a way to fix any problems that occur due to a plugin upgrade. Rolling back to a previous version is usually an easy enough solution.

That said, the very best way to avoid issues is to be proactive. Prepare for updates via a staging server if at all possible. Become fanatical about backing up your database through a plugin or your web host. It’s also a great idea to keep a local copy of your entire WordPress install on hand for emergencies. If you’re really serious, give version control a try as well.

The post What To Do When WordPress Plugin Updates Go Wrong appeared first on Market Blog.

Copyright 2009. E-mail Me
Auto Spare Parts