
After an update, a hack, or a wrong click, your site stops working, and you know there’s a backup somewhere. You can restore a WordPress backup through your hosting control panel or a backup plugin by restoring the files and database from the same restore point. After restoring, check the permalinks and cache, and make sure the cause of the problem wasn’t restored along with the site. If things went wrong after an update, try the simpler solution first Site Down After an Update, because often disabling just one plugin is enough. Below, you’ll learn what’s involved in restoring a WordPress backup: the correct restore point, the process, and the follow-up check. This article is part of WordPress Management: The Complete Guide.
Before you begin: three questions
Before you restore a backup, you’ll want to know whether you’ve secured the current state of your site, what’s wrong, and whether any new data is still coming in. That’s because restoring means overwriting. It works like rewinding a videotape, where everything recorded after that point is erased. My first piece of advice may therefore seem contradictory. First, back up your broken site—for example, in Installatron. Even a broken site contains today’s orders, form submissions, and text, and this way you can retrieve them later. Many hosting providers do not automatically preserve the current state when restoring, so don’t count on it.
The second question is whether you know what’s wrong. When there’s been a hack, I never just restore a backup, because the vulnerability is still there and it’ll happen again within a few days. First, fix the root cause, and then verify that the backup is complete—including both files and the database—and that it was created before the infection. You can read about how to do that at Remove malware, or you can leave it to WordPress hacked. The third question applies mainly to online stores. If any orders or form submissions are still coming in, export them first (see WooCommerce Backup) and put the store into maintenance mode.
Which restore point will you choose?
The restore point is the date and time of the backup you're restoring, and which point is appropriate depends on what went wrong. Also, you don't always need to restore everything. Often, a partial restore is enough—just the database or just the files—and that way you lose less data.
| Situation | Select this restore point | What do you put back? | Please note |
|---|---|---|---|
| Failed update | Just before the update | Often just files | Don't blindly reinstall the update |
| Hack | Last clean backup—often further back than you think | Everything | First, fix the cause, then reinstall the core via Dashboard > Updates, then updates and passwords |
| Content deleted or setting incorrect | Just before the change | Database only, or the revision via undo changes | Everything added to the database after that will be deleted |
| Corrupted database | Last working backup | Database only | Files and the database must be compatible |
That last column is more important than it seems. If you only restore the database while your plugins have since been updated, a plugin may sometimes expect a different database structure than what’s actually there. Files and the database should together form a backup set from the same point in time. If you’re unsure, restore everything. How far back you can go in the event of a hack depends on your hosting plan and how long your backups are retained.
Restoring a WordPress Backup: Three Methods
There are three ways to restore a backup, ranging from simple to technical. I recommend the first one, because it works even if WordPress itself no longer loads. If you're unsure about the restore point, test it first on a clone of your site in Installatron, a simple staging environment.
Through your hosting control panel
- Log in to your hosting control panel and open the backup section; for Surver, that's JetBackup 5 in cPanel.
- Select the restore point by date and time.
- Choose what you want to restore: everything, just the files, or just the database.
- Confirm and wait until the repair is complete.
With a backup plugin
A backup plugin restores data from the WordPress admin panel. In UpdraftPlus, go to Settings > UpdraftPlus Backups, tab Backup/Restore, check the boxes and click Recover. The downside is that this only works if you can still log in. If the site is down, first install a fresh copy of WordPress and the plugin, and then link the backup from your cloud storage.
Manual
You should only perform a manual restore if the other methods are not available. You can import the database into an empty database using phpMyAdmin, or with WP-CLI via wp db import backup.sql. Use (S)FTP or the file manager to move the files back to the correct folder, usually especially wp-content. Then check in wp-config.php or whether the database name, username, and password are correct.
After resetting: check the following points
After rolling back, check to make sure the site is working, your data is complete, and the issue has truly been resolved.
- Clear the cache of your cache plugin and your browser; see clear the cache.
- If pages return a 404 error, resave the permalinks via Settings > Permalinks.
- Log in and check your homepage, a few pages, and the media library. Is the site URL correct, and does Google Search Console report any new errors in the days that follow?
- Test your forms and, for an online store, the checkout process, or leave that to WooCommerce Management.
- Apply the updates that were released after the restore point; otherwise, the old, vulnerable version will be back online. Within WordPress maintenance We'll do that for you every month.
- After a hack, change all passwords for WordPress, the hosting control panel, and FTP. If you change your database password, you'll also
wp-config.phpat. - Remove orders or submissions made after the recovery point from your export and compare them with your payment provider; see online store offline.
With us, you don't have to worry about making backups yourself. At Managed WordPress Hosting We automatically create daily, weekly, and monthly backups on external servers in separate data centers within Europe. You can restore data on the shared hosting plans yourself, free of charge, using JetBackup 5—separately for files, databases, or email accounts. A backup you created in Installatron must be restored in Installatron. JetBackup also does not automatically save your current state, so be sure to create a backup yourself first. If you’re on Surver Cloud, please contact support. And test your backup before you need it. Here’s how to do that and how often you back up your data, as you can read in WordPress Backup and Migration: The Complete Guide and the maintenance checklist.
Frequently Asked Questions
How do I restore a WordPress backup if I can no longer log in?
In that case, use your hosting control panel or the manual method with phpMyAdmin and (S)FTP. A backup plugin only works if WordPress itself is still loading. If neither of these options works, install a fresh copy of WordPress and reconnect the backup plugin.
How long does it take to restore a backup?
That depends on the size of your site and your media library. Using the hosting control panel usually takes just a few minutes, but doing it manually takes longer. You should also allow time for a follow-up review.
Can Surver restore the backup for me?
For shared hosting plans, you can restore it yourself, free of charge, using JetBackup 5 in cPanel. If you're unsure which restore point to choose, Surver's support team will help you figure it out.