Get the Best WordPress Backup
& Migration Plugin Today
Get Duplicator Now
Announcement for Duplicator's new inline help

[NEW] Introducing Inline Help to Clarify Backups and Migrations

Are you not sure what the Duplicator plugin can do? You can now use inline help to immediately find answers…
Backup WordPress database

How to Back Up a WordPress Database 

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 want to back up your WordPress database?

In case your website has a server error or cyber attack, it’s important to back up your database. Once you save copies of your database, you can restore it after data loss or other unexpected changes. 

In this tutorial, we’ll give you a step-by-step guide on how to back up a WordPress database!

Quick Summary: How to Back Up a WordPress Database

1. Install a database backup plugin.
Duplicator Pro is the best plugin for backing up WordPress sites. It allows you to customize backups, send data to the cloud, and even migrate your entire website.
2. Create a database backup.
With Duplicator, create a new backup and choose a storage location. In the Archive section, select Database Only. This will only include your database in the backup.
3. Download the backup.
Once you have a database backup, download it. You can restore it at any time by re-uploading both backup files to your server. Duplicator also has a one-click restore button and disaster recovery.
4. Set up automatic database backups.
To make sure you can always access your data, we’d recommend enabling automatic backups. Duplicator supports hourly, daily, weekly, and monthly backup schedules. Feel free to create a separate schedule for your database to back it up more frequently.

Why You Should Back Up Your WordPress Database

Behind the scenes of your website, many components work together to show your content to visitors. WordPress websites have core files with custom themes, plugins, and uploads. Plus, there is a MySQL database.

Your database stores and organizes the data for your website. It saves your posts, pages, user data, categories, tags, and much more.

To keep your data secure, it’s important to back up your website. This way, you’ll have a saved copy on hand if an error occurs.

Here are some reasons you might need to have a backup of your WordPress database:

Before any of these WordPress errors happen, you can back up your database. When you have regular backups to fall back on, you’ll always keep your website functioning correctly. 

Keep in mind that you should also create a full backup of your WordPress site. If your website crashes, a database backup won’t be enough to fully restore your site’s functionality. You’ll also have to have a complete backup of your site’s files. 

How to Back Up a WordPress Database

Now that you know why database backups are important, let’s talk about how to perform one! We’ll show you all the backup options available for your database. 

Method 1: Back Up Your Database With a Plugin

If you want to start backing up your database, you have two options. You could either use a WordPress backup plugin or do a manual backup. 

To make sure your data is backed up correctly, we’d recommend installing a plugin. This will allow you to avoid making errors in your database.  

Step 1: Install Duplicator

Duplicator is the best WordPress backup plugin. You can use it to easily save your entire website or parts of the site like your database:

Duplicator Pro plugin

Unlike other plugins, Duplicator Pro is well-equipped to handle large websites. If you need to back up the database for your WordPress Multisite network or ecommerce site, Duplicator is the right tool for you.

Not sure if Duplicator can back up your database successfully? See how Harald Polz, a travel blogger, creates 400GB backups with Duplicator!

To get started, select a subscription for Duplicator Pro. After you check out, download the plugin and save your license key.

Then, you’ll need to install Duplicator in your WordPress admin dashboard.

Before you start using Duplicator, it’s important to activate your license key. First, go to Duplicator Pro » Settings » Licensing:

Duplicator license key

Paste your license key in the Activation settings. Now you’ll be prepared to back up your database!

Step 2: Create a Package

Using Duplicator, you’ll create packages (or backups) that contain your website’s content, plugins, themes, database, and WordPress files. These packages are fully customizable, so you can easily save just your database if needed.

To create your first database backup, go to Duplicator Pro » Packages » Create New:

Create new backup

On the next page, name your package. Under Storage, select the offsite location where you want to save your website backup. Duplicator supports local storage, as well as remote services like:

Database backup storage location

For this tutorial, we’ll save the database backup to the local server. If you want to save your backup to the cloud, check out our guide on how to create a cloud WordPress backup.

Next, you’ll need to adjust the archive file to only include your database. Normally, it would also package your core WordPress files, plugins, themes, and other data.

To do this, find the Archive section. Then, click on the Database Only tab:

Backup WordPress database

After you click Next, Duplicator will scan your website. If a successful database backup is possible, you’ll see all Good notices:

Database scan

Lastly, hit Build. Your database backup will start automatically

You can also use Duplicator to back up your media library, core WordPress files, or other custom combinations of site data. However, as we mentioned earlier, you’ll need to have at least one full backup of your WordPress site files and database. For complete backups, don’t make any changes to the default package settings. 

Step 3: Download Your Backup

Once you create a backup, you can download it to your computer. If your database ever becomes corrupted, this backup will be available for recovery.

To download your backup, go to the Packages page. Then, click on Download » Both Files:

Download database backup

This will download your database in a zip file. You’ll also get an installer.php script.

If you need to restore your database, you can re-upload these files to your server. Then, visit https://your-domain/installer.php to launch the Duplicator recovery wizard.

However, there’s an easier way to restore your database. Next to the database backup, hit the Restore button:

Restore database backup

You’ll see the recovery wizard in a pop-up window. It’ll warn you that only the database is included in the backup. To start the restoration, accept the terms and notices and click on Restore Backup.

Duplicator restore database backup

Then, confirm the installation:

Confirm database restoration

By now, your original WordPress database will be restored! Use the Admin Login button to access your site again.

Restored WordPress database

Keep in mind that a database-only package won’t restore your WordPress files. You should only use this method if there is an error within your current database. To fully restore a broken site, you’ll need to import a complete package of your entire website.

Step 4: Set up Automatic Backups

If you run a WooCommerce store, you might want to regularly back up your database to save your customer data. Instead of creating manual backups every time, consider enabling automated backups.

In your dashboard, go to Duplicator Pro » Schedules » Add New:

Create website backup schedule

First, give your backup schedule a name. For example, you might label it Monthly Database Backup:

New database backup schedule

To only back up your database, you’ll need to create a custom template. To do this, hit the + icon next to Package Template:

Create package template

On the next page, name the template. Then, select the Database Only option:

Database backup template

You can also choose a custom storage location if you’d like. Once you make these changes, go back to the Schedules page. Be sure to select the template you just created:

Select package template

Now you can choose how often you want your database backed up. Duplicator supports monthly, weekly, hourly, and daily backups:

Automatic database backup schedule

You’ll also need to set a Start Time. This will tell Duplicator when you want to start the backup.

Finally, scroll to the bottom of the page. Here, check the box next to Enable This Schedule:

Enable backup schedule

After you save your backup schedule, your database will be automatically backed up. By creating scheduled backups, you’ll have peace of mind that your data is secure!

Method 2: Back Up Your Database With phpMyAdmin

If you don’t want to use a plugin, you can also back up your database manually. However, this is not the best backup solution because it comes with more room for error. For secure site backups, we’d recommend using Duplicator instead.

One way to manually back up your database is through phpMyAdmin. This software allows you to manage your MySQL databases with a web browser. It provides an intuitive interface for administrating WordPress database tasks.

Usually, hosting companies will give you access to phpMyAdmin. With Bluehost’s WordPress hosting plan, for example, there is a phpMyAdmin button in your control panel:

WordPress phpMyAdmin

Once you’re in phpMyAdmin, select your database name. Then, click on the Export tab:

Export WordPress database

For the Export Method, choose Custom. The Format should be a SQL file:

Custom database export

Under this, you’ll see a list of database tables. You can deselect any of these to exclude them from the export file:

Custom database tables export

Next, scroll down to the Output section. Here, select Save output to a file. You’ll also need to set the Compression to zipped or gzipped:

Database output

To download your database, hit Go. Your database will download as a zipped or gzipped backup file to your local computer. You’ll need to save this in case your database ever unexpectedly changes. 

Method 3: Back Up Your Database With cPanel

If you don’t want to deal with phpMyAdmin, you can also back up your database in your cPanel dashboard. Many web hosts have a built-in database backup feature.

First, open cPanel. Find the Files section and click on the Backup option:

cPanel backups

On this page, you’ll see different ways to back up your WordPress website. To download a copy of your database, click on the database name under Download a MySQL Database Backup:

cPanel database backup

This will automatically download your database as a SQL file. If you ever need to restore it, go to Restore a MySQL Database Backup and upload the file.

Frequently Asked Questions (FAQs)

How do I back up and restore my WordPress database?

You can back up and restore your WordPress database using the Duplicator Pro plugin. Simply create a new package and only include the database in the archive file. Download the package and reupload it to your site to restore your database when you need to.

How do I do a full backup of my WordPress site?

You can fully back up your site by creating a package with Duplicator. By default, Duplicator will bundle your site files, custom plugin and theme data, and database tables. After your package is built, you can download the archive and installer files to your computer. These make it easy to restore your site later if needed. 

What is the best WordPress backup plugin?

The best WordPress backup plugin is Duplicator. You can use it to schedule automatic backups or back up your site in real-time. The plugin also has cloning and migration options to help you move to a new host without downtime. 

Alternatives: BackWPup, BlogVault, and UpdraftPlus are also effective backup plugins with incremental backups and customizable backup files. However, Duplicator provides a standalone installer which makes it easy to restore backups. Plus, it can back up larger sites and Multisite networks. 

How do I manually back up my WordPress database?

You can manually back up your WordPress database by exporting it in phpMyAdmin. As an alternative, some web hosting providers have a backup feature in cPanel. 


That’s it! You now know how to back up your WordPress database.

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

Are you ready to start backing up your database? Download Duplicator Pro today!

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.