This is a routine operation for many webmasters. Most of the time, it happens automatically, without you even thinking about it.
Its importance is paramount for your WordPress site. It's thanks to it that you can restore it in case of a major problem, such as a data breach.
This operation is the WordPress backup.While backing up WordPress may seem simple at first glance, its technical implementation can be more complex. Hence the importance of mastering it by applying best practices.
This is what you will know how to do by the end of this article. It will detail four methods for copying your website to a secure location, with or without the help of a plugin.
What is a WordPress backup?
A WordPress backup is a backup of your website.
This action consists of copy the latest version of your site (files + database) in a secure location so that it can be restored in case of a problem (hacking, server error, bad handling by the webmaster etc).
To put it simply, WordPress can be backed up in two different ways:
- Manually.
- Automatically, for example using a backup plugin or a dedicated tool offered by your hosting provider.
What are the best practices for backups?
Backing up WordPress is essential, especially for security reasons (but not only that, we'll come back to that shortly). For a backup to be effective, it must be:
- Complete. A WordPress backup must contain both your site's files AND database. The database contains all your site's posts, comments, links, and other content.
These files represent your entire WordPress site (WordPress core, plugins, themes, images, etc.). This is what you'll find inside your site's root directory, accessible via your FTP client:
public_html.- AutomatedBy scheduling your backups, you ensure you always have a copy of your site at regular intervals. It's also good practice to perform manual backups from time to time, as a precaution in case of problems with your automated backup service.
- Stored in different locations and off your website. To do this, you can copy your site to remote storage (in the cloud), a hard drive, another server, an email account, etc. If your site is hacked, you will be able to recover your copy without any problem.
- Secure, so that your data is protected against unauthorized access.
How often should you back up WordPress?
A good backup is also a regular backup. In this regard, you might be wondering when to back up your WordPress website?
"It all depends on how often you publish content," he explains WordPress documentation regarding backupsTo help you find the answer, ask yourself this question: if your site were no longer available now, what is the oldest version of your site that you would want to reinstate?
To help you decide, here is our advice:
- If your site has static content that does not change (no new content or products added), a weekly backup will suffice. There's no need to back up WordPress daily in this case, as you risk unnecessarily overloading your database, which can slow down your page load times;
- If your site is dynamic and you modify it several times a day, save it daily. This would be the case, for example, of a blog on which you publish one or more articles per day;
- If you have a WooCommerce-type online store With many products and daily transactions, we recommend that you back it up even more often (e.g., every 6 hours or every 12 hours, for example).
Please note that the above are general cases that should be adapted to your personal situation. Ultimately, it's better to back up too much than not enough.
Finally, keep in mind that it is important to Perform a WordPress backup as soon as you make a major change to your website..
Why back up WordPress?
Backing up WordPress is a good practice to adopt without delay. Indeed, thanks to a backup, you can restore the latest version of your site whenever you want. A backup also provides an appropriate response to:
- a hack which would lead to the theft of your data and/or that of your clients. Unfortunately, hacking doesn't just happen to other people. On average, 30,000 websites are hacked every day, according to security specialist iThemes.
If such a mishap happens to you, the faster you restore your WordPress site, the more you limit the damage. - A human error due to improper handling, especially if you are in the habit of giving your clients control over their sites, or if multiple users have access to your site (e.g., on a WordPress multisite installation).
- A conflict between two extensions following an update that went wrong, resulting in your site crashing (error 500, error 502 or error 503).
- A desire to migrate your site to another location (new hosting provider, local installation, etc.). Thanks to a backup, you can easily transfer it.
More broadly, backing up a WordPress site is a preventive maintenance operation essential to the proper functioning of your WordPress site, just like regular updates, performance optimization, or fixing security vulnerabilities.
There are several methods to back up the CMS WordPress, which we will now detail. Let's start with a classic: backing up WordPress using a plugin.
How to back up WordPress using a plugin?
What WordPress backup plugins are available to you?
Backing up WordPress with an extension is the simplest and fastest method: the plugin will take care of everything for you, automatically.
Urban artist This solution is suitable for both beginners and more experienced users.The question remains: which extension to choose? Among the dozens offered in the official WordPress extension directory, we could mention:
- UpdraftPlus.
- BackWPup.
- Jetpack.
- BlogVault.
- Duplicator.
- Backup Guard.
- WPvivid etc.
For the purposes of this tutorial, Our choice fell primarily on UpdraftPlus for several reasons :
- With over 3 million active installations, this is the most popular backup plugin ;
- It is frequently updated.
- His rating is excellent, as do the reviews from its users. In our opinion, it's one of the best backup plugins for WordPress.
- Its The interface is easy to use. and translated into French.
- This is a WordPress backup plugin free (in any case, its free offer is sufficient to get started).
- UpdraftPlus includes the basic options of a good WordPress backup plugin : backup scheduling, manual and/or automatic backups, ability to back up files and the database, export possible to a remote storage space (Google Drive, Amazon S3, Dropbox etc), restoration possible from the plugin interface.
Some security plugins Generalist plugins like iThemes Security or SecuPress also offer a backup function. However, the options available are often more limited than with a dedicated backup plugin.
Alternatively, you can also back up WordPress using a dedicated maintenance plugin such as WP Umbrella ou ManageWPIn addition, you can also perform your updates from a single dashboard. This is a useful solution if you manage multiple WordPress sites, for example, for your clients.
How to create a WordPress backup with UpdraftPlus?
Step 1: Install and activate the extension
On your WordPress administration interface (back office), go to Plugins > Add New and type "UpdraftPlus" in the search bar. Install and then activate the extension :
Step 2: Perform a WordPress backup
Go to Settings > UpdraftPlus Backups to access the extension's dashboard.
From there, you have two options:
- Perform a manual backup to get a copy of your site immediately.
- Schedule an automatic backup.
Let's start with the manual method. To use it, click the blue "Save" button.
A highlighted pop-up window will open. Then check the following boxes according to your needs:
- Include your database in the backup (recommended).
- Include your files in the backup (recommended).
We also recommend sending your backup to remote storage by clicking the "Settings" link. Finish by clicking the "Backup" button.
Once the WordPress backup has been completed, you will find it in the section called "Existing Backups":
If you wish to schedule an automatic backupSimply click on the "Settings" tab and choose your preferred backup frequency:
Finally, don't forget to upload it to your chosen remote storage by clicking the icon of the service you're interested in, just below. Finish by saving your changes at the bottom of the page.
How to restore a WordPress backup with UpdraftPlus?
Once your site is backed up, this opens the door to a possible restoration.
If you need to use this option, Click the "Restore" button in the "Existing Backups" section..
Next, choose the elements of your site that you wish to restore by selecting the boxes of your choice:
How do I back up my WordPress site manually?
After using a backup extension, let's move on to method #2, which is a bit more technical: manual backup.
The process will also be longer than with an extension. However, you will retain control over your actions and will not need to install any additional plugins on your site.
Finally, sometimes, A manual backup will be necessary if you can no longer access your administration interface.In this case, using a plugin will be pointless.
Step 1: Back up the website files to an FTP client
To begin, you must first make a copy of your site's files. You can access WordPress files using two tools:
- Consider an FTP client (File Transfer Protocol). This is software that allows you to send the files of your choice to your hosting server (online, therefore).
- Either the administration interface provided by your hosting providerOne of the most common is cPanel, but your hosting provider may not offer it. Therefore, we will focus here on using an FTP client, which is more universal.
One of the most famous FTP clients is called Filezilla (free). This is the one we will present to you in the following lines.
Connect to FileZilla using the credentials provided by your hosting provider. You will need four pieces of information: the connection host, the port, a username, and a password.
Next, navigate to the root directory of your site.Depending on your hosting provider, it will have a different name. For example, in the example below, the folder is called public_html (you could also have www, for example).
To copy your root folder, select it and right-click, then click "Download":
Once your files are uploaded – this can take up to several minutes depending on the size of your site – put them in a safe place. Copy them, for example, to a hard drive and/or to a cloud storage account..
Step 2: Back up the database on phpMyAdmin
Next, we'll focus on the key element of your WordPress site: its database. For now, you only have the WordPress files.
This is not enough to have a complete backup and will make any restoration impossible.
To back up your WordPress database, you need to export it.To do this, head to phpMyAdmin, a web application that allows you to manage your database.
You can easily access it from your hosting provider's interface. On cPanel, simply click on phpMyAdmin in the "Databases" section:
Choose your desired database from the left-hand panel, then click the "Export" tab. Two export methods are available:
- Fast : all your tables will be automatically included in the backup.
- customizable You will be able to choose which tables you want to export.
Leave the format set to SQL, and click "Run":
How do I restore a manual WordPress backup?
Do you need to restore a manually backed-up copy of your site? Proceed in two steps:
- Add the backed-up root directory to your FTP client.…at the root of your site. First, give it a different name (e.g., public) so as not to overwrite the current directory. Once everything is set up correctly, delete the original root directory (public_html) and rename the folder called public to public_html.
- Import your database into phpMyAdmin via the "Import" tab. (Importing a WordPress backup). To do this, simply download the latest exported file from your database by clicking "Browse". Leave the other default settings as they are and finish by clicking the "Run" button.
How do I back up WordPress with my hosting provider?
After using a plugin and the manual method, there is a third method to back up WordPress: going through your hosting provider.
However, be careful. First of all, Not all hosting providers necessarily offer backup features..
Furthermore, the backup options offered can vary from one hosting provider to another. For example, some do not allow manual or scheduled backups.
Others will offer a limited number of automatic backups. To learn more, the easiest way is to contact your hosting provider's customer service.
If you are looking for hosting providers that are both high-performing, secure, and offer impeccable customer service, we recommend the following providers:
How do I back up a WordPress site locally?
To conclude this overview of methods for backing up your WordPress site, let's focus on local backups.
Working locally means working directly on your own computer (and not online). This is useful, for example, for conduct risk-free tests (updates, adding new plugins etc.), or simply to design a site from scratch before migrating it to production.
One of the best-known tools for working locally is called Local (formerly Local by Flywheel).
Here's how to back up a WordPress site locally, using the free Local tool:
- Start your site by clicking on "Start site" in the top right corner.
- Click on the 3 small dots next to his name, then on "Export".
- In the next window, click on "Export site" (you can exclude file extensions of your choice, if needed).
- Give a name to the zip file that will be generated and select its save location on your WordPress site.
- Again, copy it to different locations (hard drive, cloud, etc.).
Subsequently, if you need to import a copy of your local site, you simply need to drag and drop your zip file onto the Local interface.
Summary
In this article, you discovered how to back up WordPress using 4 methods:
- With a plugin.
- Manually.
- Via the backup system offered by your hosting provider.
- Locally.
Regularly backing up a live WordPress site is essential to protect your content and data.This is also a necessary prerequisite to be able to restore your site in case of a problem.
Backing up your WordPress site should be part of a regular maintenance operation, which is essential to ensure its optimal functioning.
Do you need help implementing our various tips for backing up WordPress? Entrust your WordPress maintenance consult experts and dedicate yourself fully to your business!