Subscribe to Our Newsletter
Get your dose of Vitamin Bee and enter your email below to subscribe to our newsletter
A majority of the sites that we manage here at Busybee Marketing are made in WordPress. Third-party plugins and the official WordPress core are constantly being updating with improvements and security patches. That’s a good thing! But keeping up on those updates can be a pain, let’s go over how to update a WordPress site.
While you could very well perform these updates directly on your live website, the best way to update is externally first – catching and fixing any errors that might pop up. The good news is that updating a WordPress site will usually work without a hitch over 90% of the time. But, most developers – including myself – have been in the crazy situation where an entire site completely breaks due to one incompatible plugin, so below is our process of updating WordPress sites.
If you’re not using a hosting solution that offers a staging environment (like WPEngine or Flywheel) you’ll need to update your WordPress website manually. If you are using WPEngine or Flywheel, you can skip straight to this section about hosted environments.
It’s better to have cPanel access in order to get this process done quickly and without error. Contact your hosting provider for more information on how to login and gain access to your cPanel instance.
It’s important that you backup your website in case something goes wrong and everything breaks. Backing up your website only takes a few minutes and can save you countless hours upon hours of troubleshooting, support phone calls, hundreds of dollars, and/or facing the consequence of even losing content.
First of all WordPress is simple, it works by using a bunch of files and a database. Like everything that’s based on code, there’s no magic or secret involved and WordPress is no exception. It’s open-source, well-documented, and awesome for most things – small business websites being just one.
To make a backup using the cPanel file manager, first select all of the files in the root of your WordPress directory and click Compress to generate a zip file to download. It might take a minute or two depending on the size of your uploads directory and the speed of your server. Download that file to your computer when it’s done compressing.
Secondly, export your database using the PHPMyAdmin tool by choosig the correct database named in your wp-config.php file and click the Export button.
Updraft is a very helpful tool if you don’t have access to cPanel. Updraft is a free plugin that lets you download your site’s files and database both on-the-fly and on a schedule.
Backing up your website using Updraft is simple, after installing the plugin you are given the option to backup themes, plugins, database, and uploads to your computer or locally on the server once or on a reoccurring schedule – which will be very helpful in the long-run.
Just a note; I’m not a very big fan of installing any unnecessary WordPress plugins. Plugins can add unnecessary website bloat and open your business up to security vulnerabilities. Using the least amount of plugins as possible way less holes and is always easier to manage when done correctly.
There are lots of ways to run a WordPress site locally. Throughout my 10 years of WP development I’ve used WAMP, MAMP, XAMP, Vagrant, and a basic PHP/SQL server. My current favorite is Local by Flywheel. It’s free, simple to use, and has many other features that make the process of website development fluid and seamless.
However you decide to run the site locally, you’ll still be using the files and database that we exported back in step #1. If you have questions on what tool is right for you, contact us and ask – we’re more than happy to help.
The zip file will then be extracted to the containing directory and the SQL file imported into the appropriate database. Doing so will/should replicate what you have running on your production server.
Make sure the PHP version that your local site is running is the same as what is running on your server. It’s important to have the least amount of different variables when you update a WordPress site.
As most WordPress tasks are concerned, there is almost always a plugin available – but think twice before going plugin-happy, because the more plugins, the more problems, and the more updating you’ll be having to do in turn!
The best, easiest, non-plugin tool to replace database strings out there is called Interconnect, it’s a free downloadable directory of small scripts that you add to the root of a WordPress site. Once you visit the URL (e.g. example.local/db-replace) a simple UI will let you search and replace strings throughout your entire database. Be sure you delete it afterwards, it’ll open up your site to hackers if not!
And if needed, that same tool should be used pushing your website back to production by reversing the URL references.
Hey, we made it! All of this work has lead up to the most important task of updating WordPress. Luckily it’s pretty simple, click Update on plugins and then Update on themes – hopefully everything works as it should once you’re done.
90% of the time these updates will be hassle-free, with the following exceptions:
If there were issues after the update then at least you’re fixing it locally and your site is doing just fine and Busybee Marketing can help with solving WordPress maintenance issues if you’re unable to figure out what’s going on.
After everything looks good it’s time to push your website back to production. You have a decision to make based on what happened with those updates in step #4:
If there were issues that had to be fixed, and your website has been frozen (no content/comment/post updates between the time of pulling it down and pushing it up), then it’s probably best to replace the entire site’s files and database via cPanel. You can refer to step #3 to revert the URLs in your database to reference production.
If there were no issues due to updating plugins or WordPress, it’s better to simply make the same changes on the live server. Why? Updating locally in the same environment as production will replicate what will happen when updating your live website.
If you’re using a deployment system that utilizes testing environments then it’s easier to update a WordPress Site. While updating still should be done externally to your production website, the process of doing so has far less steps (at a monetary cost).
Due to the fact that updating a WordPress website is much easier using a system such as WPEngine, the list of steps are much shorter:
Might as well do some other stuff while you’re in the process of updating your website. Busybee Marketing offers maintenance plans that handle the processes above and also any extra helpful tasks, check out all of our digital services here.
I've been writing code for almost half of my life – since WebTV and a Commodore 64. I stumbled into web development 15 years ago and moved to California, working in Silicon Valley for ten years and moving back to the east coast in 2014.