Get the Best WordPress Backup
& Migration Plugin Today
Get Duplicator Now
Announcement Duplicator WP-CLI commands

Announcing Duplicator WP-CLI Commands (And How They Speed Up Backups)

Looking for a smarter way to manage site backups? Explore Duplicator's new features, including customizable WP-CLI commands and permission settings!
Backup WordPress database

Backing Up Your WordPress Database: It’s Easier Than You Think! 

Written By: author avatar Joella Dunn
author avatar 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: reviewer avatar John Turner
reviewer avatar 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.

Even if you do everything right, a plugin conflict could corrupt your database. Or worse, a hacker could gain access to your site.

But what if you could turn back time?

That’s the power of a WordPress database backup.

Once you save copies of your database, you can restore it after data loss or other unexpected changes. It’s your database’s insurance policy if something ever goes wrong.

In this tutorial, I’ll show you how to back up your WordPress database. Because it’s not a question of if you’ll need one, but when.

Table of Contents

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 Backup section, select Database Only.
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.

Black Bike Media thought they lost a client’s 2.4GB database because it got corrupted. Fortunately, they were able to restore a backup and get the database back to normal.

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 » General.

Activate Duplicator license key

Paste your license key and activate it. Now you’ll be prepared to back up your database!

Step 2: Create a Backup

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

To create your first database backup, go to Duplicator Pro » Backups » Add New.

Add new backup with Duplicator

On the next page, name your backup. Use dynamic tags so you can restore the right backup later if needed.

Duplicator dynamic backup tags

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

Backup storage locations

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 backup to only include your database. Normally, it would also include your core WordPress files, plugins, themes, and other data.

To do this, find the Backup section. Then, click on Database Only.

Create database-only backup

After you click Next, Duplicator will scan your website. Check any notices before continuing with the backup.

Duplicator backup scan

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 backup 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 Backups 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. Save these in a safe location just in case you need to restore your database in the future.

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 » Schedule Backups » Add New.

Add scheduled backup with Duplicator

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

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

Create new backup 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 database backup 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.

How to Restore a Database Backup

Remember when you downloaded two backup files with Duplicator? 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 backup 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 backup of your entire website.

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 backup and only include the database.

To restore your database, find a database backup on the Backups page and hit Restore. You could also re-upload a backup to phpMyAdmin or cPanel.

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

You can fully back up your site using Duplicator. By default, Duplicator will bundle your site files, custom plugin and theme data, and database tables. After your backup 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. 

Conclusion

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:

Ready to Protect Your Data?

Upgrade to Duplicator Pro for automatic database backups and one-click restores!

Get Duplicator Pro Now
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.