It is important to back up the WordPress site.
Disasters strike when you least expect them. The server that hosts your WordPress site can crash or be hacked. It can turn your efforts spanning months or years into nothing within no time.
In this article, we will discuss how to back up WordPress blog or site.
Here are the topics that we discuss:
- Things to Backup in WordPress
- Where to Store Your Backup?
- How Often to Back Up Your Site?
- Different Methods to Backup a WordPress Site?
- Backup Using WordPress Plugins
- How to Backup WordPress using the UpdraftPlus Plugin?
- How To Restore From A Backup?
- Set Up an Automatic Backup with UpdraftPlus.
- How to Restore WordPress Installation from Google Drive?
A few days back I logged into the WordPress admin area. But when I tried to publish my brand new article. All of sudden I got a page not reachable message.
I was trying to figure out the things but none was working. I had a backup copy of the articles. But what about the customization that I had made to the site?
A few articles were updated without taking any backups. Everything seems to have gone forever. The web support team informed us that It was a major fault. and that it may take up to 12 hours to recover.
I was waiting with my fingers crossed. I could do nothing it was out of my hands. Can you ever imagine losing all your hard work in split seconds?
I was in luck as they were able to recover it sooner than the deadline. Everything was back to normal.
But this incident taught me a valuable lesson. I should have taken the backup to save myself from this type of unwanted worry.
You should make a routine to take the backup. And the next best thing is to automate the whole process.
Things to Backup in WordPress
A WordPress installation consists of two components that are
- Website Files – includes WordPress theme, plugins, static pages and supported media
- Database – contains all the text content like posts comments and links
Both of these components are stored separately on the server.
A complete backup should include backing up of website files as well as the database.
Where to Store Your Backup?
The first thing that comes to your mind is your PC. Never take the backup to your PC. It’s better to use some external storage device.
One of the best methods is to store your backup in the cloud. You can use Google Drive, Dropbox or even your email.
The ideal option is to save the backup at two different locations
How Often to Back Up Your Site?
The answer to this question is more often than you can. Next, the best option is every time you make a change to your site or before you attempt any upgrade to your site.
The frequency of backup should be more during the launching of your site. As you will be making frequent changes to your site during this time.
After the launch, you should take the backup before any WordPress upgrade or major changes to your site
Different Methods to Backup a WordPress Site?
These are the different methods you can use to back up your WordPress site.
Backup By Your Hosting Company
You must choose a web hosting company that takes a full backup of your WordPress site. This backup generally lasts up to the next backup cycle.
Some of the web hosts backup the server in the form of an image of the entire server. It may be difficult to extract your site from this server image.
They may be storing backup data on the same server on which your site is hosted. If the server crashes, your backup along with the original data will be wiped out forever.
So it’s very important that you always download the backup to any external disk or to the cloud
Manual WordPress Backup
If you want to back up WordPress site manually. You have to make a separate backup of the files and database
Backup your WordPress Files.
Login to your hosting account and locate the File Manager.
Now look for the WordPress Directory that you want to backup.
After clicking on this WordPress directory click on the Download option and select Download zip from the drop-down menu
You can also right-click the folder and from the drop-down menu select Download to save the folder to your PC.
Backup Your Database Files.
For the database, you have to access phpMyAdmin. You will find it under the Database menu
Login to your hosting panel and locate phpMyAdmin.
On the phpMyAdmin panel locate Databases and click it.
If you have more than one database, click on the database that you want to back up. in the above case, we have a single database
You will see the Structure view tab of the selected database.
On top of the page click on Export.
There are two methods to export the database
If you select Custom then you’ll have to select all the tables
Next in the output section, you should check the Save output to a file option. For Compression select None.
If you have a small database for larger sites you have to use a compression method in place of none.
If you want to overwrite an existing database check the “Add DROP TABLE under the object creation option
In order to prevent errors during restores due to existing tables check “IF NOT EXISTS”
Finally, click on Go to save the database to your computer.
Finally, you have taken the backup of WordPress files as well as the database.
Backup Using WordPress Plugins
One of the easiest methods is using a backup WordPress plugin. Before we go searching for the plugin. We should be very clear on our plugin requirements
The WordPress backup plugins requirements
- Easy to restore from the backup
- Should backup files and database
- Automatic backups and scheduling
- Ability to store the backup on other platforms
Based on the requirements we have selected the Updraftplus WordPress backup plugin.
It’s a free WordPress backup plugin which is easy to use for beginners. Check out this post on how to install WordPress plugins
How to Backup WordPress using the UpdraftPlus Plugin?
From the WordPress Admin Area. Dashboard >> Plugins >> Add New. Using the right side search box look for Updraftplus.
Install the UpdraftPlus plugin and Activate the plugin.
How To Take A Backup?
From the Dashboard menu click on Plugins >> Installed Plugins. Locate the UpdraftPlus Plugin and then click on the Settings link.
In the Backup/Restore tab click on the Backup Now button
Perform a backup window that will open. Tick all the boxes in the window and click on the Backup Now button.
After the completion of backup, you will the Backup data entry as in the below image
All the existing backups will be found in this tab
How To Restore From A Backup?
If by mistake you delete/change something on your site or you want to go back to a previous version of your site.
You can restore the backup from the Backup/Restore tab.
Go to UpdraftPlus Settings >> Backup/Restore tab under the Existing backups section.
Select the backup you want to restore.
Click on the restore button
On the restore option window tick all the checkboxes and click on Next.
Click on the restore button. The process of restoring your site will start now.
After the process finishes you will see a Return to UpdraftPlus Configuration button.
Click on this button and you will come back to the wordpress admin panel.
You can visit the site to check your site restore status.
Set Up an Automatic Backup with UpdraftPlus.
In order to prepare the wordpress site for automatic backup. We have to configure the frequency and no backup is to be taken.
In the UpdraftsPlus Settings tab. Select the Files backup schedule and the Database backup schedule. You should set it to Weekly.
Also, select how many schedule backups you want to retain as in the image.
The best value to select should be 4 in each case and click the save button at the bottom of the page.
On the setting page under Choose your remote storage. Select your desired option for storage. In our case, we have selected Google Drive.
After clicking on the Google Drive icon. In the following window click on the link after authenticating with Google.
Sign in with Google dialogue box will open.
After selecting the Google account. Click on the Allow button.
The UpdraftPlus setup complete window will be visible upon completion of the process.
Click on the Complete Setup button.
You will be routed back to the Backup/Restore tab. You can check the next backup date on this page.
Finally, we have configured the UpdraftPlus plugins for automatic backup.
How to Restore WordPress Installation from Google Drive?
If your site is crashed and you want to restore it from Google Drive. The first thing that you have to do is to remove the old WordPress installation
Log in to your web hosting account. Locate your website site and delete it
Locate and delete the associated Database from your web host admin panel
Next, go for a fresh WordPress install on the same domain. If you want step-by-step instruction. Check the guide on how to install WordPress for beginners.
After the completion of wordpress installation, install the UpdraftPlus plugin using the Plugin menu of your WordPress Admin Area.
If you have never installed a plugin and want a step-by-step method. Use the guide on how to install WordPress plugins for beginners.
On installing the UpdraftPlus plugin make sure you Activate the plugin.
Now navigate to the Setting link
You will not find any existing backup in the Backup/Restore tab.
In order to restore your website from the backup, you saved to Google Drive
Follow the steps to link your plugins to your Google Drive as we have done earlier
Make sure you are linking to the same storage location where you have taken your backup earlier.
On completion of linking up of the storage locations
Go to existing backups and click the link Rescan remote storage.
Now you will see the list of restore points that you saved earlier.
You can click restore on the desired backup and restore your site.
Taking backup is one the most important activity and you should never ignore it.
You should always take backup whenever you are making a change or upgrading your site.
This will protect you from many unwanted worries. It will also protect your hard work – the hours that you have spent customising and updating your site
I would love to hear from you please let me know your views.