How to Backup a WordPress Website? – The Top 3 Ways [Beginner’s Guide]

  • How Tos

When we are developing a website, we plan all the possible scenarios -right from the development to the testing stage to the final deployment. Everything is picture-perfect. But once the website goes live, there are a lot of factors that are not in our control.

All these factors can lead to two things – website downtime and data loss, which in turn can affect SEO rankings and revenue. Once a website experiences downtime, the frantic chase to find the possible cause and solution to get the website back online starts. The problem here is not knowing how much time it will take to fix the issue. You can do damage limitation if you know how to back up a WordPress site and do it on a regular basis.

Having a WordPress backup won’t prevent website downtime, but will help you bring the website back online without any drama and minimize data loss. In this article, we will look at why you need to regularly back up a WordPress website, the factors that can cause website downtime and lead to data loss, and also the different ways to back up a WordPress website.

What is Included in a WordPress Backup?

Before we take a look at the different ways to back up a WordPress website, we need to know what to include in the backup. If you are starting to create your first backup, then there are a lot of questions that need answers and a few of the common ones are:

  • Which files do I need to copy to create a complete backup?
  • Where are these files located?
  • Why should I copy these files?
  • How much time will it take?
  • How often should I back up my site?

The files that you need to copy for a complete WordPress backup are divided into two:

1. The WordPress core files

WordPress core files

The core files are located in the folders such as wp-admin, wp-content, wp-includes, and all the other files in the root folder.

The wp-content folder will contain all your themes, plugins, uploads, and media files.
The wp-admin folder will contain everything needed for the WordPress dashboard to work.
The wp-includes houses all the files needed for your WordPress website to work properly.

2. The Database of your website

The database on the other hand includes posts, comments, settings, and so on. The database can be accessed from your hosting account.

WordPress database

It’s always recommended to take a backup of both the files and the database. Now when you have a recent WordPress backup, the chances of data loss are very minimal. If your website faces any technical glitch or other programming error, you can easily revert back by restoring the backup

Now we can create a WordPress backup either with the help of a plugin or manually, which we will discuss in detail later. If you are using a backup plugin, the plugin will automatically back up the database and the core files.

If you are doing a manual backup procedure, you can access the core files via FTP or from your hosting account. The database can only be accessed from the hosting account. If you are a cPanel user you can access the database from phpMyAdmin and the core files from the File Manager. How much time it will take to create a full backup will depend on how much data your website holds.

How Frequently Should You Back Up Your WordPress Website?

It entirely depends on how often your website sees new content and also the type of website. If your website gets updated with new content every day, which is the case for online stores, news portals, and other active forum websites, where new articles, reviews, comments, order updates, and feedback are left, then creating a backup regularly is the ideal way. 

Let’s take a scenario, where the website gets updated with new content each day, and your backup pattern is every 4 days. So if you did the first complete backup on Monday, then the next full backup procedure would be on Friday. Now, what if your website suffers a downtime, let’s say on Thursday. Now, in this situation, the recent backup is from Monday, which essentially means you have lost data from Tuesday, Wednesday, and Thursday. This can include media files, comments, and so on. But if you used to back up daily or hourly, you could have minimized the data loss.

Now, on the other hand, if your website doesn’t get updated every day, then a daily backup is not needed. Once a week would suffice. Every time your website gets updated with new content, create a complete backup, it’s that simple.

The Two Types of WordPress Backup One Can Create

Now, there are two kinds of backups that we can do:

  • A complete backup
  • An incremental backup

A complete backup is where we make a copy of all the files, every single time. Now the second one, the incremental backup option can be accessed if you are using a backup plugin, for example, UpdraftPlus.

Once we have a made complete backup, we can make use of the incremental backup. The incremental backup is where we only make a copy of the files that were changed since the last backup. This applies to the database also. There are a couple of advantages, such as less time needed to create a new backup and the subsequent backups not taking a lot of storage.

The Top Scenarios Where Having a WordPress Website Backup is Priceless

When it comes to owning and maintaining a website, the goal is to be proactive. Just because your website hasn’t faced a scenario that causes downtime doesn’t mean it never will.

There are a lot of factors that can pop up which in turn results in website downtime. Now having a WordPress backup assures two things- you can reduce the website downtime as well as limit data loss.

The top scenarios where having a backup is useful are:

Compatibility Issues Arising From Updates

One of the most common causes for a WordPress website to face downtime arises from updates. It can be updates to the themes, plugins, or even an update to the WordPress core files. New updates can cause compatibility issues and lead to unexpected downtime. If you don’t experience downtime, then the functionality of the website will be affected and will deliver a bad user experience.

Here having a backup will help you to revert the website back to what it was before the recent update messed it up.

Countermeasure Against Malware Infection

WordPress malware infections don’t always cause downtime, but they can have other major impacts. Vulnerabilities in themes, plugins, and other causes can pave the way for malware infections. A malware infection can lead to redirects and changes in the outbound links, as they get replaced with malicious ones

If you suspect that your website is infected, the best thing to do is to restore a previous version that wasn’t infected. In this way, you can be sure that you are completely free of any infections and also alert all the users to change their credentials. Also, check for recent updates from the concerned plugin and theme that addresses and fixes the vulnerability.

Working on a Live Website

When you are working on a live website, be it your own or a client website, it is always recommended to take a full WordPress backup, before you start working on it. This can be helpful if something goes awry after you have made the changes. Rather than panicking in such a situation, if you have a backup, you can just revert back and focus on finding what caused the website to crash.

Recover From a Successful Break-in

Hackers don’t always use malware to reach their goals. Sometimes they can use brute force attacks to gain access and make the changes. If you detect that your website credentials have been compromised which led to a breach, you can re-do everything the hacker did, by restoring a backup. By restoring a backup, you essentially replace the tampered code with genuine code from the backup. Also, just like in the malware case, alert all the users to change their login password.

Website Migration

When you are migrating your website to a new host, never do it without first creating a complete backup. The migration may not always be successful on the first attempt, as things can break. In such scenarios having a WordPress backup is a must to ensure no data is lost.

Server-side Issues

If by chance your web host experiences any issues, the chances of it affecting your website are there. If your web host doesn’t provide a 100% uptime guarantee, then making regular backups is a must to prevent data loss.

The Top Ways to Back Up a WordPress Website

Now that we have covered how useful a backup of your WordPress website will be, it is time to learn the different ways in which you can back up your WordPress site. There are three ways to back up a WordPress website and they are:

  • With the help of a backup plugin
  • Making a backup directly from the hosting control panel
  • Create a backup by using an FTP file manager

Creating a WordPress Backup With the Help of a Plugin

Let’s start with how to create a WordPress backup with the help of a plugin. There are a lot of WordPress backup plugins available, but for now, we will be going with UpdraftPlus. To get started install the plugin from the repository and head to the Settings tab and select UpdraftPlus Backup.

Updraft plugin to back up a WordPress website

Now you have accessed the plugin menu, creating the backup is a pretty straightforward method. Select the Backup Now button to create a WordPress site backup.

Updraft WordPress backup plugin

You will be asked whether you want to back up the database and files or just any one of them. By default, both are selected.

Updraft plugin settings

Click on Backup Now and a new backup will be created. You can view all your backups under the Existing backups menu.

Updraft plugin existing backups

If you want to download the backup to your local system, select which data you want to download and proceed forward.

Updraft plugin download backups

You can also automate the backup and choose remote storage options from the settings menu.

Updraft plugin automate options

UpdraftPlus also offers an incremental backup solution with its premium plan. Incremental backups are where we only back up the files that were changed since the last backup. One can schedule the incremental backup from the settings.

Updraft plugin incremental backups

Make a Backup Directly From the Hosting Control Panel

Creating a backup from your hosting control panel is not a difficult task. For this purpose, we will be using cPanel to demonstrate the procedure. Remember not every host has a cPanel and the method to download the database will vary, some web hosts have their own file manager.

Firstly, log in to your cPanel and head to Files>File Manager

Cpanel menu

Then locate your website’s directory, which will be “public_html”. Select your website files and compress them.

compressing website files

Now download the compressed zip file and save it to your local storage.

We are not done yet. In order to complete the WordPress backup, we need to also download the database. In order to do that, head to phpMyAdmin from your cPanel.

phpMyAdmin

Once you are in the phpMyAdmin area, head to the export tab to download the database.

phpMyAdmin database export

That’s it you have created a complete backup.

Create a WordPress Backup by Using an FTP File Manager

We can also create a backup with the help of an FTP file manager. We will be using FileZilla to demonstrate the process. Even if you download all the files using FTP, you will still need to log in to your hosting account to download the database.

To get started, open the FTP client and enter the credentials to connect to your site.

Once the FTP client establishes a connection, you can see the files on the right side. The files on the left window are everything that is on your local system.

Locate your website’s files, usually in the public_html folder, and download them to your local system.

Now we need to complete the process by downloading the database. Remember, we are using Cpanel, but will vary according to your host. Head to phpMyAdmin and export the database.

database export

Wrapping Up

Having a complete backup of your WordPress site is useful in a lot of scenarios. Always make sure you back up both the database and the files.

The WP Week Newsletter

A weekly newsletter covering updates from the WordPress ecosystem that are relevant and helpful for WordPress agencies, developers, and enthusiasts

One Comment

  1. I have read your article on backup for wordpress website. There are so many points, which are interested. But I also have some points to include in your article.
    1.Use a reliable backup plugin
    2.Schedule regular backups
    3.Store backups in a secure location
    By following these tips, you can ensure that your WordPress website is always up-to-date and secure. Readers, If you want to develop your wordpress website, you can take a free consultation from a company like Alakmalak technology. As they helped me a lot.

Leave your comment

Your email address will not be published. Required fields are marked *