Upgrade errors can range from relatively minor formatting issues causing the pages to be displayed incorrectly through to more serious problems where the page is not shown at all, but instead replaced with an internal server error or page cannot be displayed.
Step 1: Test the upgrade first on a staging site
In order to minimise the amount of downtime for your website (ie where it is unavailable), the upgrade should first be tested on a separate ‘staging’ website. A staging site refers to a website setup as closely as possible to the live site including all files and databases, so that the upgrade can be tested under the exact same conditions.
The staging site should be setup on the same web server as the live site since differences in web server configurations can cause different results when testing your site. Normally the staging site is run on a sub-domain of the live site (ie staging.yoursite.com).
Step 2: Restrict access to your live site during an upgrade
Website access to your live site should be restricted during an upgrade, offering you time to check everything works before allowing anyone else access to it.
Access to your website can be restricted by IP address. An IP address is a numerical identifier assigned to each device when it connects to the internet. Finding out what your IP address is very easy and can be done with one of the many online tools such as www.getmyipaddress.org.
The web server can be configured to allow visitors from selected IP addresses access to your website whilst redirecting visitors with other IP addresses to a holding page. This holding page is normally a static web page which can sit outside your main website folder. It usually has some text to inform the visitor that the website is temporarily unavailable due to maintenance. Adding a time when you expect the website to be back up and running is also useful for visitors who see the page.
A warning about automatic upgrades
With some open source software such as WordPress, there is an option to automatically upgrade your website to the latest release via a link in the admin section. However proper testing of the upgrade should still be carried out, since customisation of the standard software via plugins, themes or bespoke web development can present new scenarios on the website which have not been previously tested.

Most important: take a backup
I almost forgot to mention this since it seems fairly obvious, but the most important thing you can do before updating your live site is to take a backup of all the files and databases for that website, so that you can revert back to the previous version, if the upgrade doesn’t work. Even if you didn’t bother doing anything else, you should always take a backup !