Get the Best WordPress Backup
& Migration Plugin Today
Get Duplicator Now
Announcement remote restores

Introducing New Remote Restores For More Accessible Cloud Backups

Are you securing your site backups in the cloud? You'll need an easy way to restore them. Our new features…
Restore WordPress database

How to Restore a WordPress Database (3 Methods) 

Written By: author image Joella Dunn
author image Joella Dunn
Joella is a writer with years of experience in WordPress. At Duplicator, she specializes in site maintenance — from basic backups to large-scale migrations. Her ultimate goal is to make sure your WordPress website is safe and ready for growth.
     Reviewed By: John Turner
reviewer image John Turner
John Turner is the President of Duplicator. He has over 20+ years of business and development experience and his plugins have been downloaded over 25 million times.

Do you need to quickly restore your WordPress database?

When managing a WordPress website, issues can happen. If you need to recover from a major error, rescue lost content, or revert to a previous version, you might need to restore your database.

In this tutorial, we’ll walk you through the essential steps to restore your WordPress database!

Why You Might Need to Restore Your WordPress Database

In a perfect world, nothing bad would happen to your website. However, having a good backup plan is very important to secure your site. By backing up your database, you’ll have a functional version to fall back on after errors, hacks, and other issues.

Let’s explore some common scenarios where you’ll need to restore your WordPress database.

Accidental Data Loss

It’s surprisingly easy to delete important posts, pages, or even entire sections of your website unintentionally. Having a database backup allows you to recover this lost content swiftly.

Website Hacks and Security Breaches

You could unexpectedly experience a website hack or security breach. In this case, you’ll need to restore your database to a point before the compromise occurred. This removes any malicious code or content.

Plugin or Theme Conflicts

WordPress plugins and themes are essential for adding new functionality and style to your website. However, conflicts between them can cause critical errors. Restoring your database can help you revert to a stable state before the conflict happened.

Testing and Development

When working on website improvements or new features, it’s common to create a staging environment. Restoring your database to a previous state can be useful when you want to reset your staging site or replicate your live site for testing purposes.

How to Restore a WordPress Database

Restoring your WordPress database is a crucial skill for any website owner. In this step-by-step guide, we will explore three different methods, so you can restore your database no matter your skill level.

Method 1: Restore Your Database with a Backup Plugin

WordPress backup plugins are powerful tools that automate the backup and restoration process. Anyone can use backup plugins, but they’re especially useful for beginners.

Step 1: Install Duplicator Pro

Duplicator Pro is the best WordPress backup plugin because it makes it easy to back up your entire website. You can also create custom backups that include just the database, media library, or other website files.

Duplicator Pro plugin

To begin, purchase a subscription for Duplicator Pro. Once downloaded, save the plugin files to your computer. You should also save a copy of your license key.

In your WordPress dashboard, install and activate Duplicator. If you’re not sure how to do this, check out this helpful guide on installing WordPress plugins.

Before you can start backing up and restoring your website, you’ll need to activate your license key. Go to Duplicator Pro » Settings » Licensing:

Activate Duplicator Pro license key

Here, paste your license key and hit Activate

Step 2: Back Up Your Database

Before restoring your WordPress database, it’s crucial to have a recent backup in place. Fortunately, Duplicator Pro simplifies this process.

To back up your database, open the Packages page and click on Create New:

Create Duplicator package

If you want to easily find the backup later, customize the package name. Then, choose a storage location. Duplicator supports all of the following options:

For this tutorial, we’ll save the WordPress database backup to the local server. 

In the Archive section, click on Database Only. This will exclude everything on your site except the database. If you need to, you can also filter out any unnecessary database tables:

Backup WordPress database

Continue to the next page. Here, you’ll see that Duplicator scanned your website. Since you’ve only included the database, it won’t scan your WordPress files:

Database scan

Lastly, hit Build to back up your database. 

To save time, consider setting up automatic backups for your database! This way, you can easily restore website backups whenever you need to. 

Step 3: Restore Your WordPress Database

Whenever an error happens, you can quickly restore this database backup. Go to your Duplicator backup log and look for the most recent database backup. It’ll have a database icon, making it easy to find:

Database backup icon

Then, hit the Restore button:

Restore database backup

This will open the recovery wizard in a pop-up window. You’ll see that only your database will be restored:

Duplicator restore database backup

Accept the terms and conditions and click Restore Backup. Finally, confirm the installation:

Confirm database restoration

Duplicator will then restore your database. After you log back in, you’ll see that your site looks and functions exactly the way it did before the error! 

Restored WordPress database

If an error locks you out of your WordPress admin dashboard, download both the backup zip file and the installer file. Then, use an FTP client like FileZilla to upload your database backup to your public_html folder. Visit https://your-domain/installer.php in a web browser to start restoring the site backup.  

Method 2: Restore Your Database with phpMyAdmin

If you don’t want to use a backup plugin, you can create a manual backup. This involves downloading your database with phpMyAdmin.

When you need to restore your database, start by creating a new one. Bluehost users can find the MySQL Databases settings, enter a new database name, and hit Create:

Create MySQL database

Then, create a new user by adding a username and password:

Create MySQL user

Finally, you can add the user to the new database. Feel free to assign it all privileges:

Add user to database

Next, log into phpMyAdmin. Click on Databases and select the new database. Then, find the Import tab:

phpMyAdmin import database

Click Choose File and upload your database backup file, which should be a SQL file. Select SQL in the Format dropdown menu and hit the Go button:

Import database

This will manually restore your database!

Method 3: Restore Your Database with cPanel

Your web hosting account may allow you to access and edit your website with cPanel, a file manager. This also includes an easy way to restore a WordPress database.

First, you’ll have to make sure your database is backed up. Open your cPanel control panel and hit Backup:

cPanel backups

Under Download a MySQL Database Backup, click on the database you want to back up:

cPanel database backup

Once you have this file, you can upload it into the Restore a MySQL Database Backup section. After this, your database will be back up and running. 

FAQs About Restoring a WordPress Database

How do I restore my WordPress database?

To restore your WordPress database, you can import a database backup created with a plugin like Duplicator Pro. Duplicator has simple restore options that walk you through the process of reinstalling your database. Alternatively, you can manually import a database backup into phpMyAdmin or cPanel.

How do I recover a deleted database in WordPress?

If your database has been deleted, recovery can be challenging. The best approach is to have regular backups in place using a backup plugin like Duplicator. Then, you can restore your website by importing a recent backup.

How do I restore my WordPress site without a backup?

Restoring a WordPress site without a backup is extremely difficult. Having regular backups is essential for recovery. If you don’t have a backup, consider consulting your WordPress hosting provider for possible troubleshooting solutions. You can also try to recover your site’s code with Google’s cache or the Wayback Machine.

Can I restore WordPress without a database?

A WordPress website relies heavily on its database for content and functionality. Without a database, restoring your WordPress site is near impossible. This makes it so important to regularly back up your database.

If your WordPress files are corrupted but you have a database backup, start by creating a new database. Then, upload your database backup using phpMyAdmin.

Next, go to and download a fresh copy of the WordPress installation files. Use an FTP client or a file manager to upload these files to your server.

Visit You’ll have to enter your new database details.

After this, a message will say that you already have WordPress installed. You can log in with your original login credentials. 

Now, perform the following actions to restore your site;

As you can see, this is not the easiest way to restore your website. To make sure your content is always secure and recoverable, make sure you’re regularly creating full backups of your WordPress site.


We hope this guide helped you restore your WordPress database!

While you’re here, you may also like these WordPress tutorials and plugin reviews:

Do you want to take one less maintenance task off your hands? Download Duplicator Pro to automate database backups and quickly restore them when you need to!

author avatar
Joella Dunn Content Writer
Joella is a writer with years of experience in WordPress. At Duplicator, she specializes in site maintenance — from basic backups to large-scale migrations. Her ultimate goal is to make sure your WordPress website is safe and ready for growth.

Disclosure: Our content is reader-supported. This means if you click on some of our links, then we may earn a commission. We only recommend products that we believe will add value to our readers.