Restore a database
Use this to roll your databases back to an earlier point. A database holds your WordPress posts, pages, settings, and orders, so restoring one changes your live content.
Before you start
- Decide which backup to use. Everything saved after that backup will be lost, including orders and comments.
- Export the current database first if there's anything worth keeping. See Export a database.
- The restore covers every database on your account. To bring back only one database, ask us. See Ask us to restore something for you.
- To find a database's name, open Account → Hosting → your site → Databases. In WordPress,
wp-config.phpalso lists it asDB_NAME.
Important: Restoring replaces the current data in your databases with the backup. Content you added since the backup is not merged in. We back up what's there first, so you can undo the restore from the Before a restore backup for 7 days.
Steps
- Open Account → Hosting → your site → Backups. Restore something is at the top.
- Under What do you want back?, choose Databases, then click Continue.
- Under Restore from when?, choose a backup, then click Continue.
- Read the summary under Ready to restore, then click Start the restore.
- The restore starts within 15 minutes. You can leave the page. Recent restores shows when it's done.
Restore into a new database
To compare old and new data, or keep the current one safe, ask us to restore to a new name. See Ask us to restore something for you.
After you restore WordPress
- Visit your site and test pages, login, and any forms.
- If you also changed files after that date, such as a plugin update, the code and database may not match. Restore the files from the same backup. See Restore files from a backup.
- If WordPress now says "Error establishing a database connection", the username or password in
wp-config.phpno longer matches. See Fix "Error establishing a database connection". - Re-save Settings → Permalinks in WordPress to rebuild rewrite rules. That fixes many 404s after a restore.
- Clear caches. See LiteSpeed Cache explained.
Restoring a hacked site
Use files and database from the same date, from before the infection. See Recover a hacked website.
If something goes wrong
| Problem | Fix |
|---|---|
| Database isn't there after the restore | It was created after that backup, or deleted before the restore. Ask us |
| Restore seems stuck | Restores start within 15 minutes. If one fails, we're notified and finish it for you. See What to include when you ask for help |
| Site works but is missing recent posts | The backup is older than those posts. Restore a newer backup if one exists, or go back with Before a restore |
| Site can't connect after restore | The database user's password may no longer match. Reset it in Databases, then update wp-config.php. See Fix "Error establishing a database connection" |
| Restore is too big for your plan's storage | Free space first. See Disk quota full |
Still stuck? Ask us and we'll walk you through it.
