This is how you restore a backup to your website: from the chosen backup through the pre-check to the verified website. The previous state is kept for 7 days afterwards. During that time, the restore can be undone.
The restore replaces today’s state
The backup replaces database and files with the state at the time of the backup. Whatever was added to the database since the backup, for example posts, comments or orders, is no longer in the website afterwards.
What is replaced and what stays
| Part of the website | What the restore does with it |
|---|---|
| Database | The tables from the backup replace the tables of the website. Tables that are not in the backup are kept by default. |
| Plugins, themes, must-use plugins, the rest of wp-content, WordPress core | The plugin replaces every entry with the one from the backup. Entries that are not in the backup are moved to the previous state. What was excluded during the backup, for example caches, stays where it is. |
| Uploads, files in the root folder | The plugin replaces them file by file. Files that are not in the backup stay where they are by default. |
wp-config.php |
Always stays as it is. |
| cloneworx Backup | Stays as it is, with targets, backup plans, settings and the list of backups. |
“By default” means: as long as the switch Remove everything that is not in the backup is not ticked. The switch is in the Extended view. What the switch removes and what it does not is explained here: The “Restore” page.
What you need
- a backup with a green or yellow dot that is complete at one configured target or more,
- the credentials of an administrator as they were at the time of the backup.
Step 1: Choose the backup
In the WordPress menu, open cloneworx and then the Restore page.
- The last valid backup with date, size, target and type.
- Restore latest backup opens the preparation for this backup.
- Import from file opens the tile that you use to add a downloaded backup to the list.
- A click on a word of the header line sorts the list.
- The padlock marks a locked backup.
- PROThe key marks an encrypted backup. More about this: Encrypt backups.
- The dot shows the result of the backup: green for complete, yellow for with warnings, red for failed.
- The green tick marks a checked backup.
- More … opens the menu of a backup.
- Show more shows more backups.
For the last valid backup, click Restore latest backup. For an older one, open More … in its row, then Restore. Prepare restore appears below the main tile.
Step 2: Read the pre-check
The pre-check starts on its own. It changes nothing on the website.
- Dismiss closes the preparation.
- Selected backup shows date, size, target and type.
- The scope: in the Compact view, the restore restores the whole backup.
- Pre-check shows nine points, each with a coloured dot, state and finding.
- Start restore is usable as soon as no point blocks the start.
- Cancel closes the preparation as well.
Every point ends with OK, Warning, Blocked or Not checked. Only Blocked prevents the start. With a warning, you assess the risk yourself. If the website has tables that are not in the backup, the pre-check lists them below the nine points; by default these tables are kept. What every point checks is explained here: The restore precheck: every point explained.
If this website does not know the backup because it was found again or imported, the pre-check asks whether you confirm the backup as correct. For an encrypted backup for which the website has no key, it asks for the recovery key. Both are explained in The restore precheck: every point explained.
Step 3: Start the restore
Click Start restore. The plugin asks for confirmation once more.
- The confirmation dialog shows the backup and says that the previous state is kept for 7 days.
- The roots that are restored. A root is a named part of the website: the database or a folder.
- You may need to log in again afterwards.
- Cancel closes the confirmation dialog. Nothing happens.
- Start restore starts the restore.
Step 4: Wait until the restore is finished
The main tile is now called Restore is running. Leave the page open.
- The step of the restore: its number, the number of steps and its name.
- The progress: entries, size and remaining time.
- Abort restore aborts the restore.
- Cancel does the same.
A restore of the whole backup has five steps: Pre-check, Building files, Importing database, Switching over and Confirming. First, the plugin builds files and tables next to the running website. The website stays reachable while this happens.
The plugin switches database, core and code in the maintenance mode of WordPress. That takes a moment. Then the new website must confirm itself: the plugin calls itself and only gets an answer if core, plugins and theme from the backup load. If the answer does not come within 60 seconds, the same step brings the previous state back.
Aborting is possible until the switch-over begins. After an abort, the page reads Restore aborted; nothing was switched. If uploads or files in the root folder had already been switched, the plugin first brings them back and reports Restore aborted; the previous state is back. As soon as the switch-over is running, the Cancel button is no longer shown, and the Abort restore link no longer has any effect. The only option left is to undo the restore afterwards.
Step 5: Log in again and check the website
- The main tile is now called Restore applied and offers keeping and undoing.
-
The backup has no wp-config.php to compare with. This is where the main tile shows the comparison of the
wp-config.phpof this website with the backup. A backup never contains the file. - The green message confirms the restore. After 8 seconds it closes on its own.
After a restore of the database, your login may be invalid. Then log in again. With the database, the user accounts from the backup come back too: the credentials from the time of the backup apply.
Check the home page, the login and the pages that matter to you. If the message is yellow instead of green, the restore is applied, but there were warnings. This message contains no link to the log: you find the log in the Extended view in the Recent restores tile.
The restore never restores the wp-config.php, and a backup never contains it: the file of this website stays as it is.
Step 6: Keep or undo
If the website runs as it should, click Delete the way back and confirm in the dialog window. If something is wrong, Undo restore brings the previous state back. More about this: Keep or undo a restore.
If something does not work
If the restore fails, the red message begins with Restore failed: … and gives the cause. The Log link in it opens the log of the restore.
| Message | What you can do |
|---|---|
| The pre-check blocks the start. | The message is below the pre-check; the restore has not begun yet. Read the point with the state Blocked. The finding gives the cause. |
| The pre-check blocked the start. | The pre-check runs once more as the first step of the restore. Nothing was written. Open the preparation again and read the pre-check. |
| The new website did not confirm itself in time; the previous state is back. | The website runs on the previous state again. Read the log and the differences in the pre-check. If the point Self-request possible warns there, leave the Restore page open until the restore is confirmed. |
| The backup has damaged entries; nothing was switched. | Check the backup: Check a backup. Use another backup, or leave out the damaged entries: Restore only parts. |
| Importing the database failed three times; nothing was switched. | The log shows the error of the database server. Start the restore again later. |
Good to know
- If you reload the page, it shows the running restore again.
- As long as a restore is neither kept nor undone, no new restore starts.
- If a restore fails, you get an email like after a failed backup, if On errors and warnings is switched on in the notifications.
See also
- The “Restore” page
- Restore a backup on another website
- Restore uploads when there is not enough space
- Find backups again after a reinstallation
On the command line
WP-CLI not set up yet? How to install WP-CLI.
The restore also works with WP-CLI. The web server takes over the switch-over. All parameters are here: Restore and import with WP-CLI.
# Show the backups with their job names wp cloneworx-backup backup list # Run the pre-check for a backup wp cloneworx-backup restore precheck <Job> # Restore the whole backup wp cloneworx-backup restore run <Job> # Show the running restore or the pending rollback wp cloneworx-backup restore status