For every website owner, there will always come a time when your website will go down. Often, this could be because of a downtime on your hosting service, but sometimes it’s because of some other reason. Maybe your website has been compromised or you did something that caused your site to go down. Notably, if you’re going to be doing some major work on your site, you shouldn’t be doing it without creating a backup first so you can restore your website to a working state just in case you mess something up. Here, we’ll teach you how to backup your WordPress site.
If you are adding some lines of your code to your functions.php file, it is best practice to create a backup copy. When you add your code and your site goes down, you simply replace your functions.php file with the working copy and voila! Your site will be back up. The same can be done for when you are tweaking your CSS files. Though errors in your CSS won’t cause your site to go down, it can really mess up how your website looks. So just create a copy of your CSS file and restore it if anything goes wrong. This basically sums up the concept of website backups only on a larger scale.
Your hosting service probably already has a few backups of your website. So you might think that creating your own backup is not necessary. That’s where you’re wrong. What’s your assurance that your hosting service creates regular backups? Certain situations can also render your host’s backups useless. So essentially, just to be on the safe side, you should have your own backup.
There are two ways to back up your website. The first one is through one of a few available plugins and the second is doing it manually.
Backing Up Your WordPress Site with BackUpWordPress
BackUpWordPress is the easiest means of backing up your website. Simply install the plugin and activate it. When that’s done, head over to tools and Backups. You can then choose between a Database Backup and a Complete Backup. To start backing up, just click on Run Now and wait until backup completes. You can also click on Settings to set the schedule for these backups. You can also add a custom schedule.
By default, your backups are stored on your server at /wp-content/backups. To restore a backup, simply find the latest working backup by navigating to the folder using an FTP client and unzip the backup on your server making sure to overwrite everything.
Backing Up Your WordPress Site with Backup Buddy
BackupBuddy is another popular backup plugin. Unlike BackupWordPress, BackupBuddy is a premium plugin so there is no free version. Once you get the plugin installed and set up, simply go to Backup. From there, you can choose to backup the database or do a complete backup. Next, you can choose to download the backup file so you can store it right in your computer’s hard drive.
You can also tweak your settings to have backups saved to Dropbox or Amazon S3, create custom backup profiles, and schedule backups.
How to Create Manual Backups
Backing Up Using MySQL
You can also backup your website manually using MySQL. To do this, head over to CPanel. From there, you can find phpMyAdmin. Click on the database and click on the Export tab. You can choose either quick or custom export. Set compression to gzip then click on Go.
Backing Up with CPanel
To create back-up using CPanel, navigate to Backup Manager and click on Create Backup. Where it says Download a MySQL Database Backup, just click on the database and download. A simple enough process but using a plugin just saves you from the trouble of doing this manually.
So when was the last time you backed up your website? Do you even have an existing backup? If you don’t, then it’s time to make one before it’s too late.
Natascha says
Hi Nick
I use a free Plugin called BackWPup and what I like about it is, that I can save my backups directly in Dropbox. Storing backups in the WP directory doesn’t seem to me a good solution. It bloats up my database and if worst things happen, the files are outside the WP installation so I can start fresh whenever needed.
But what I miss most in your article, and in many other posts too, is how to install backed up files again. Explained for an average user. I have looked at the WordPress.org explanation but it wasn’t self explanatory enough for me. Hence why I call myself an average user.
Nick J says
Hi Natascha
That is a really good point, not much use having a backup on your server if that’s what goes down. We use vaultpress for important sites and backupbuddy for others to achieve that.
I understand the challenge of trying to restore a site. Luckily it is rarely needed. I think the important thing is that you do have a backup of your site for the rare occasion that you will need it and at those time you at least have the option to pay a professional to restore it for you.