WordPress backups: methods, tools and a step-by-step guide to restoration
What needs to be backed up, how often, where should the copies be stored, and how can they be restored? A clear approach to prevent a system failure, human error or a cyberattack from turning into a disaster.
A WordPress backup is only of any value if it actually enables the site to be restored. Many site owners think they are protected because a plugin displays ‘backup complete’ or because their hosting provider keeps an automatic copy. However, a backup may be incomplete, stored in the same location as the site, too old, or impossible to restore without assistance.
The method must address four questions: what data to back up, how often, where to store the files, and how to verify the restoration. A showcase website, an active blog and a WooCommerce shop do not have the same requirements. This guide sets out a practical approach – the 3-2-1 rule – the differences between host-provided and plugin-based backups, and the precautions to take before restoring a live site.
- A full WordPress backup includes the files and the database.
- Keep several copies, on at least two different types of media, including one stored off-site.
- The frequency must keep pace with the actual flow of orders, forms and amendments.
- A backup is no guarantee: test the restore process regularly.
- Before carrying out a restore, identify any recent data that might be overwritten.
What does a WordPress site contain? The files and the database
A WordPress site is made up of two main components. The first consists of files: the WordPress core, themes, plugins, media uploaded to the library, configuration files and any bespoke developments. The second is the database: it contains posts, pages, comments, user accounts, settings, menus, WooCommerce orders and a great deal of data added by plugins.
To restore a website to its exact original state, you generally need both sets of files and to know the login details. A backup of the files without the database can restore the design and media, but not the content or the forms. A database backup on its own can restore text and settings, but not images or the code for the theme and plugins.
- wp-content/uploads: images and documents
- Topics and sub-topics
- Extensions and custom components
- Useful configuration files
- Pages, articles and content
- User accounts and roles
- Settings and menus
- Orders, forms and business data
The wp-config.php file contains, amongst other things, sensitive database connection details. It must be protected and must never be sent over a public channel. Backups may also contain personal data, email addresses and order details. They must be stored securely and access must be restricted to authorised personnel.
The 3-2-1 rule applied to WordPress
The 3-2-1 rule is a simple method for reducing the risk of losing all your copies at the same time. It recommends keeping three copies of your data, on two different types of storage media, including one off-site copy. For a WordPress site, this might mean a live copy, a copy on independent storage, and an additional copy that is outsourced or stored offline.
| Principle | WordPress application | Reduced risk |
|---|---|---|
| 3 copies | Production + remote backup + additional copy | Loss of a unique archive |
| 2 holders | Server/hosting provider and cloud storage or separate storage medium | Failure of the same piece of equipment |
| 1 off-site | Copy stored in a separate account or location | Incident affecting the primary hosting service |
The key point is independence. If all backups are stored in the same hosting account and an attacker gains access, they could potentially delete the website and its archives. An external copy, protected by a separate account and strong authentication, reduces this risk. For a business, it is also useful to keep a periodic, read-only or offline copy.
You should therefore supplement this with a policy tailored to the amount of data you can afford to lose. A shop that receives orders every hour needs to arrange for more frequent backups than a corporate website that is updated once a month.
Hosting provider backups or WordPress plugins: which should you choose?
The backups provided by the hosting provider have one advantage: they are often managed at server level and may include both files and the database. Depending on the package, they may be automatic, retained for several days and restorable via the customer control panel. They are useful for quickly restoring an account following a user error or a server failure.
Their limitation is that they remain tied to the provider and to the retention period specified in the contract. A copy held solely by the hosting provider is not necessarily an independent backup. Check whether you can download the archives, whether the databases are included, how many restore points there are, and whether a partial restore is possible.
A backup plugin can give you more control: frequency, file selection, database export, remote destination and restoration via the admin panel. However, it depends on WordPress functioning correctly, server limitations and the configuration of the remote storage. A poorly configured plugin may only back up part of the site or fail silently when the archive becomes too large.
| Criterion | Hosting backup | WordPress plugin |
|---|---|---|
| Management | Often centralised in the hosting control panel | From the WordPress admin panel |
| Independence | Depends on the supplier if no external copy is downloaded | Can send archives to a third-party storage provider |
| Catering | Depending on the tools and services offered by the hosting provider | Depending on the plugin, access to the site and the available resources |
| Control | Varies depending on the contract | Fewer adjustments, but more responsibility |
| Proper use | Server restore point and rapid recovery | Outsourced copying and detailed planning |
The two methods can complement each other. A server backup makes it easier to restore the system to a recent state, whilst an independent copy protects against the loss of the hosting account. However, avoid using too many tools without checking their results: several plugins running backups simultaneously can use up resources and fill up disk space.
How often should backups be carried out, depending on the type of website?
The frequency should be based on how often changes occur and the impact of a loss. Ask yourself this question: if the site were to disappear today, how much data could you afford to lose? This timeframe is known as the recovery point objective (RPO). It helps to determine whether a daily backup is sufficient or whether more frequent backups are required.
| Type of site | Approximate frequency | Items to be protected |
|---|---|---|
| A showcase website with few changes | Weekly, plus whenever a significant change is made | Pages, media, forms, themes and plugins |
| Active blog | Daily or according to the publication schedule | Articles, comments, media and settings |
| Website with a members’ area | Daily, or even more frequently depending on the activity | Accounts, profiles and personal data |
| Online shop | Very common for transactional data | Orders, customers, payments and catalogue |
These frequencies are starting points, not universal rules. A shop that receives few orders may have different requirements to a high-volume business. Also remember to take backups before an update, a migration, a theme change or any technical work. A one-off backup before a risky operation complements the automatic routine.
How to restore a WordPress site, step by step
A restore may overwrite existing files and data. Before you begin, determine the scope of the restore: the entire site, the database, the media folder or a specific component. If a shop has received orders since the last backup, restoring the entire database may delete those orders. In this case, a targeted restore or recovery of recent data may be necessary.
Select a backup taken before the failure or intrusion. Check its date, size and the scope covered.
Even if the site is damaged, keep a copy before restoring it. It may contain recent data or information that is useful for diagnosis.
Check the disk space, PHP version, database settings and the necessary access permissions. For complex operations, first carry out the restoration in a test environment.
Follow the procedure provided by your hosting provider or the plugin. Ensure that both components are set to the same backup date when you restore the entire site.
Check the login details, website URLs, permissions and any specific paths. Avoid changing database values without knowing what they do.
Check the homepage, pages, images, forms, logins and payments. Check the error logs and mobile navigation.
If the restoration is in response to a cyberattack, do not put the website back online straight away without rectifying the cause. A backup may contain the same malicious file or the same compromised account. You must identify the date of the intrusion, change access credentials, update components and analyse the files before considering the incident resolved.
Testing your backup: the check nobody should forget
An untested backup is merely a hypothesis. To check that it is usable, restore it in a separate environment, using a copy of the database and files. Check that the site starts up, that the media files are present, that the accounts are working and that the essential plugins are loading. Also check that the recent data corresponds to the expected date.
A successful test must be documented: date, archive used, restoration time, any problems encountered and necessary corrections. This record makes it possible to determine whether the procedure is still valid should the hosting provider, theme or plugins change. For a mission-critical website, establish a regular testing schedule and appoint a person to be responsible for it.
FAQ: WordPress backups and restores
What should you back up on WordPress?
You must back up the website files and the database. The files include, amongst other things, media, themes, plugins and custom elements. The database contains content, settings, accounts and business data.
Is an automatic backup provided by the hosting provider sufficient?
It can be useful, but check how often it is performed, how long the backups are retained, what they cover, and whether it is possible to download a separate copy. An external backup reduces the risk of losing all copies in the event of an incident affecting the hosting service.
Is it possible to restore just the database?
Yes, provided the issue relates solely to the data and the current files are intact and compatible. For a full restore, the files and database must generally correspond to the same backup point.
How long should backups be kept?
The retention period depends on the type of site, business requirements and storage capacity. Retain several recent backups and a few older ones, taking into account data protection requirements and your internal policy.
Can a backup re-infect a hacked website?
Yes. If the backup was created after the breach or contains a malicious file, restoring it may cause the problem to recur. You need to identify a clean point in time and analyse the site before bringing it back online.
Are your WordPress backups really reliable?
Elvis Web can set up a backup strategy, check existing backups and carry out a restore test to minimise the risk of data loss.
Find out about maintenanceWordPress TroubleshootingRequest a quote