How to Upgrade to WordPress Painlessly

It never fails. WordPress releases an update and all hell breaks loose. You will see thousands of tweets and blog posts about when it happens. Usually there are more people in pain and agony as the photo shown right than those who are rejoicing “Hooray! I somehow did it with no problems!”

It is not uncommon when WordPress rleases a new update, you will notice an increase in people swearing and cursing and calling WordPress all sorts of nasty names and in a huge panic that their entire site is down.

Despite what many people may think, WordPress is not the one to blame.

If you are one of the people who had no problems: Yes, you are lucky. Not lucky by accident, but lucky that you either have a good webhost, don’t use many third party plugins/themes or have learned from previous past experiences (whether be your own or from others) a couple of useful tricks to avoid these hassles everyone else isĀ  experiencing.

And if you have had these problems, well now you are just lucky to be reading this :) Hopefully it will help you upgrade successfully for every future wordpress upgrade and avoid the pain and heartache.

Here are a few tips for upgrading painlessly:

Good Hosting is EVERYTHING.

While the cost of hosting often has a lot to say about its reliability and ability to run WordPress efficiently, it is not always the case. I have had some $10/month shared hosting providers do better than $35/month VPS services or $20/month “cloud servers”. Often, most upgrading problems can be completely blamed on hosting.

These things will greatly affect your updating/upgrading experience:

PHP Version & Settings: The most recent version of PHP should be used. Why would use buggy and/or outdated PHP to run your WordPress software? It doesn’t make any sense, yet many webhosts don’t use the latest version OR you have to do a song and a dance to get it. (Most people don’t even realize there are multiple versions to choose from!) Settings also vary greatly for things such as php memory limits, max execution times, etc. etc. If using shared hosting, you may not have much flexibility here.

Server Resources: Shared hosts especially see issues on WordPress upgrade/update days, simply because there may be hundreds or in some cases thousands of WordPress powered sites on 1 server. When all these sites update at the same time, it causes a lot of extra stress on the server, and it is usually not pretty. If you use a popular webhost famous for overselling space or resources, you should probably wait a few days or weeks to avoid this issue.

Checking Third Party Plugins and Themes

Any reputable theme and plugin developer should and will test their plugins and themes with the latest versions of WordPress before the official release. Because WordPress is open source, most plugins and themes can be tested against beta releases to ensure compatibility with the update before it happens. Unfortunately, most don’t do this. Don’t assume a paid/commercial plugin will work with the latest version of WordPress! If you are not 100% certain, either proceed with caution, or email the developer directly to find out for sure or check the forum.

Helpful Tips for Painless Upgrading:

Make a BackUp First! Having multiple backups of your site is always good. That way, if it fails, well, you can always start over and try again. While automated backups are nice, be sure to do one manually yourself for times when it is really important, or at the very least, check that the “automated backup” did indeed backup and is working and stable :)

Switch to WordPress Default Theme Before the Upgrade: You can always count on the WordPress default theme to work with upgrades. After a successful upgrade then you can switch back to the old theme you used. Often times the “blank white screen of death” is due to a theme or plugin being broken.

Deactivate All WordPress Plugins Prior to Upgrade: WordPress will automatically de-activate and then re-activate all plugins when it does the upgrade. The problem of course, is when re-activated they may not be compatible! I find it is best to re-activate them all one by one until I know they are all safe. It is usually best to start with those you know are “safe” (ie: Askimet or Hello Dolly) – then start tinkering with the ones that are more important.

Timing is Everything: You don’t have to upgrade the moment you learn the new version of WordPress is available. If on a shared host in fact, I recommend waiting if possible. You will likely notice for the next few days your sites will be a bit slower than normal due to so many people suddenly running backups and upgrading. Obviously, if it is a crucial security update then you shouldn’t wait – but for others it probably won’t be disaster if you wait 2-3 days, maybe even 4-5 or 7-10. Also, if you have 30 WordPress powered sites on the same hosting package, you’ll probably also want to space them out or at least do 1 by 1 if possible if server resources are a concern.

Be Patient: Don’t try to multi-task while updating. A careless accidental click in the WordPress panel may leave you stuck in maintenance mode. Don’t visit other websites while upgrading, because if they have a slow/unresponsive script that makes you end up having to shut down your browser or laptop in the middle of an upgrade, you could find that the whole wordpress updating process may go incomplete. Try to avoid running other “prone to freezing” programs on your computer as well.

Do you have any additional tips to share about how to upgrade WordPress without the pain and struggle? We’d love to hear your tips and suggestions below!

WordPress Stuck in Maintenance Mode

Photo Credit: Joe Zlomek

You login to your wordpress dashboard, all excited to write a new post and you see your blog has some updates it needs. So, maybe you update your plugins or a theme, and usually all goes well without a glitch. But sometimes, you do things to cause errors, or sometimes a plugin or theme or WordPress itself does not update perfectly on its own due to server time outs or other issues.

You now have a “Briefly unavailable for scheduled maintenance” page where your site should be, and you can’t even login into the WordPress dashboard.

Fortunately, while you are stuck in maintenance mode and locked out of the WordPress dashboard, it can be fixed relatively easily. Be sure you ALWAYS, ALWAYS have a back up of your site before proceeding!

If This Happened While Updating Themes and Plugins:

99.9% of the time, all you need to do is delete the plugin/theme from your server via FTP. You’ll be back into WordPress in no time. Do however make sure that you make a back up of the theme/plugin if you made customizations. Otherwise, you should be able to re-install it with a fresh/updated copy and be on your merry way. You may lose some of your settings, but unless you are using a very complex plugin or theme, this should get you back up to speed quickly.

If the theme or plugin you use stores information in your database, you may also need to visit phpadmin. This is usually done within your webhosting control panel, and it varies for all hosts as to where it is located. Once there, click on the database name, find the plugin or theme specific tables, and after making a backup, delete them as well to try a completely fresh install. Unfortunately, there are just too many plugins and too many variables for me to give you step by step instructions or guarantee this will work for all plugins – so if your attempts to simply delete and then reinstall a plugin do not work, check with the plugin/theme author for specific instructions.

If the thought of deleting a plugin or theme completely (even when you make a backup first) makes you nervous, you can first try disabling all plugins by using either phpadmin or ftp. More details at WordPress.org codex here

What to Do When WordPress Core Upgrade Fails

This greatly depends on the version you are upgrading to. Generally, the first step is to look for a file in your blog’s directory through ftp called .maintenance and delete it. This should hopefully remove the Maintenance warning and you can access the WordPress dashboard to continue the upgrade (you may be prompted by a message to click a button to upgrade the database first)

If that does not fix it, and you’ve already tried deactivating themes and plugins, you are probably going to have to restore your site from a database backup. There are a number of wordpress database backup and restore plugins you could use as an option, or you can do it the old fashioned method of creating a new database and reuploading your old files from before doing the upgrade.

How to Avoid This Problem

While there’s no sure fire way to avoid this, there are things you can do that will greatly minimize the possibilities of this happening later:

1. Upgrade with Each Release: Usually, if you upgrade say from version 1.2 to 3.4 of a plugin or theme or WordPress, it’s going to break and go haywire, regardless of the plugin or theme. It’s much better to upgrade from 1.2 to 1.3 to 1.4 as new releases are made available – so always stay on top of updates!

2. Do not navigate away from the page or click on any other links until update is complete: I just recently made this mistake – I updated a plugin, and then before I got the updated confirmation page, I accidentally clicked on the comments link – therefore locking me out of WordPress. Just be patient :)

3. Use good webhosting: Some shared hosting plans just can’t handle automatic updating at all. This is especially of hosts that have outdated php versions or limit your php memory to only 20MB. See our list of best hosting for WordPress.

4. Always Have a Backup!: You can’t have enough backups of your website, especially before doing changes that can affect the database or files on your server.

Do you have any tips for someone who’s stuck in maintenance mode or has been locked out of WordPress? Share them in the comments below!