Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
WPB Cup
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

How to Duplicate WordPress Database Using phpMyAdmin

We’ve come across several situations where duplicating a WordPress database becomes necessary. Like when you’re setting up a staging environment to test new features, or when you’re migrating your site to a new host.

You may be looking to create a backup before making significant changes, or perhaps you need to clone your site for development purposes. Whatever your reason, knowing how to duplicate your WordPress database is a valuable skill for any website owner or developer.

In this guide, we’ll walk you through the step-by-step process of duplicating your WordPress database using phpMyAdmin.

How to Duplicate WordPress Database Using phpMyAdmin

When You May Need to Duplicate WordPress Database With phpMyAdmin

phpMyAdmin is a web application that helps website owners manage their databases. It has a user-friendly interface that lets you do various database-related tasks without having to use a command-line tool.

One use of phpMyAdmin is duplicating WordPress databases. To clarify, there are actually easier ways to clone your WordPress database for beginners, such as with Duplicator. You can scroll down to the last section to check out those methods if you’re more comfortable with them.

However, there may be situations where you may want to use phpMyAdmin instead:

  • If you use a free migration plugin, it may not have features like database selection or advanced export/import options.
  • If you’re experiencing plugin conflicts, using phpMyAdmin can bypass any potential errors and ensure a clean database duplication.
  • For users comfortable with database management, phpMyAdmin offers more flexibility. You can perform tasks like searching or replacing specific data within the database before importing, which might not be readily available in plugins.

With that in mind, let’s take a look at how to duplicate your WordPress website‘s database using phpMyAdmin. We will cover different methods, and you can use the links below to quickly jump to each one:

💡 Need help with maintaining your WordPress website? Let our WordPress maintenance experts handle your site’s routine and security tasks so that you can focus on your business. We’ll take care of backups, malware removal, uptime monitoring, WordPress updates, and more.

Schedule a Free Consultation Call Today!

Method 1: Cloning Your WordPress Database With phpMyAdmin

This method is suitable if you want to manually create a backup or set up a staging environment for testing updates and changes.

First, you need to open your WordPress hosting control panel. In our tutorial, we are working with Bluehost. Your control panel may look slightly different from our screenshots, but the steps will be similar.

If you use Bluehost, then you can navigate to the ‘Websites’ tab. After that, find your site and click on the ‘Settings’ button.

Bluehost site settings

At this stage, you will find various menus and settings to manage your website and hosting.

Here, find the ‘Quick Links’ section and click on ‘phpMyAdmin.’

Navigating to the phpMyAdmin in Bluehost

Now, you are inside your web hosting’s phpMyAdmin. Here, just click the ‘Databases’ tab at the top and select your WordPress database from the list of databases.

If you are not sure what your database name is, it’s the name you input when you first installed WordPress. You can also find it in your wp-config.php file if you forget.

Selecting a database on phpMyAdmin

Next, you will see a list of your WordPress database tables.

On this page, just click on the ‘Operations’ tab from the top menu.

Selecting the Operations tab on phpMyAdmin

This is where you will duplicate your database. Go ahead and scroll down to a section called ‘Copy database to.’

In the empty field, simply rename the database. Then, make sure the ‘Structure and data’ box is checked. This option will copy both the structure and data of the database.

Additionally, the ‘CREATE DATABASE before copying’ option should be ticked. This will automatically create a new database where the duplicated data will be located.

The rest of the settings can be left as is. All you need to do next is click ‘Go’ at the bottom.

The 'Copy database to' section on phpMyAdmin

And that’s it! Your database has been successfully cloned.

After this, you can navigate to your newly duplicated database by clicking on the new database name from the left panel.

Navigating to a newly duplicated database on phpMyAdmin

Method 2: Exporting and Importing WordPress Database With phpMyAdmin

This second method is best if your hosting company does not allow users to create databases directly from phpMyAdmin. This may be the case if you are using shared hosting services where certain privileges are restricted for security reasons.

In this situation, you may not be able to see the ‘Copy database to’ section in the ‘Operations’ tab. To duplicate your database, you can use the export method instead.

Essentially, you will export your database SQL file, set up a new database, and then import that database into the new setup.

The first step is to visit phpMyAdmin and select your WordPress database like we did in the previous method. Then, in the top menu, simply click the ‘Export’ button.

Here, you need to select ‘Custom – display all possible options’ in the ‘Export method’ section.

Opening the 'Export' tab on phpMyAdmin and selecting the Custom option

Once done, just scroll to the Output section and choose the ‘Save output to a file’ option. This will make sure that your database is exported as an SQL file.

For the rest of the settings, you can leave them as they are.

Configuring the phpMyAdmin Export Output settings

Now, all you have to do is scroll down to the bottom and click ‘Export.’

Your browser will now download the WordPress database as an .sql file.

Clicking the Export button on phpMyAdmin

Next, you need to create a new database where you can import this file to. This can be in the new web hosting server you’re moving your website to.

To do this, you need to open your hosting control panel’s database settings. If you use Bluehost, then you can just go back to your dashboard, find your site, and click on the ‘Settings’ button.

Bluehost site settings

Now, switch to the ‘Advanced’ tab.

Then, find the cPanel option and select ‘Manage.’

Bluehost advanced cPanel

In cPanel, just go to the ‘Databases’ section.

After that, click on ‘MySQL Databases.’

Opening the MySQL Databases page on cPanel

On this page, you need to fill out your new database name. In our example, we used _copy after the original database name to differentiate the old name from the newly duplicated one.

After that, just click the ‘Create Database’ button.

Creating a new MySQL Database on cPanel

Now that we’ve created a new database, let’s assign it to a MySQL user.

Go ahead and scroll down the ‘Add User to Database’ section and select a MySQL username from the dropdown menu. Make sure to choose the new database you’ve just created in the ‘Database’ field.

Once done, click ‘Add.’

Adding a new user to the MySQL Database on cPanel

You will now be redirected to the ‘Manage User Privileges’ page.

Simply check the ‘ALL PRIVILEGES’ option if you want to have total control over your database.

Checking the All Privileges option when adding a new MySQL user on cPanel

Then, go all the way down to the bottom of the page and click ‘Make Changes.’

Your newly created database is now ready.

Clicking the 'Make Changes' button to set the privileges of a new MySQL user on phpMyAdmin

Let’s go ahead and open phpMyAdmin again and select the database you just created in cPanel.

Once inside, you’ll see that the database is empty without tables like this:

No tables found in database message on phpMyAdmin

To continue, simply go to the Import tab from the top menu.

Here, click on the ‘Choose File’ button to select the .sql file you downloaded earlier.

Choosing an SQL file to import in phpMyAdmin

Once finished, scroll down to the bottom and click the ‘Import’ button.

phpMyAdmin will now upload the file from your computer and import your database.

Clicking the Import button on phpMyAdmin

And that’s all! You have successfully imported your duplicated database.

Alternative: Use Duplicator to Duplicate Your WordPress Database (Beginner-Friendly)

As mentioned before, this phpMyAdmin method is just one way to duplicate your WordPress database.

But admittedly, this way isn’t the most beginner-friendly. If you’d rather use a plugin instead, then you can use Duplicator. This plugin lets you create a custom backup package just for your WordPress database.

Plus, there is a one-click button to restore your WordPress site’s files in an instant.

You can read more about the plugin in our full Duplicator review and our step-by-step guide on how to clone a WordPress website.

Is Duplicator the right backup and migration plugin for you?

Want more WordPress cloning plugin recommendations? Check out our expert pick of the best WordPress plugins to clone or duplicate a site.

Optimize Your WordPress Experience With These Guides

Want more tips to improve your WordPress management? Check out the articles below:

We hope this article has helped you learn how to duplicate a WordPress database using phpMyAdmin. You may also want to see our expert pick of the best WordPress database management plugins and how to restrict WordPress admin access by IP address.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

Disclosure: Our content is reader-supported. This means if you click on some of our links, then we may earn a commission. See how WPBeginner is funded, why it matters, and how you can support us. Here's our editorial process.

Editorial Staff

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

The Ultimate WordPress Toolkit

Get FREE access to our toolkit - a collection of WordPress related products and resources that every professional should have!

Reader Interactions

8 CommentsLeave a Reply

  1. Moinuddin Waheed

    I have faced a wrong backup problem with one of my websites where I used a backup plugin and was convinced that all my posts and pages would have been backed up. But after few days when I wanted to get those files on my new website, it was completely lost.
    Doing backup manually through the php myadmin dashboard is a wise decision and it gives confidence and satisfaction that I can revert and use that backup whenever I would need it.
    Thanks for this guide for making backup manually.

    • WPBeginner Support

      It can certainly be a good idea to do a manual backup on the off chance there is an issue.

      Admin

  2. Jiří Vaněk

    Wouldn’t it be easier to create a database dump and import it to the new server if I were to migrate the website? Alternatively, if I wanted to duplicate a website to create a live version and a development version, wouldn’t using a staging plugin, which duplicates the database and allows transferring changes from the development to the live version, be a better option for beginners?

    • WPBeginner Support

      Using migration plugins can make the process easier but this is an alternative for those looking for a manual solution.

      Admin

  3. ASHIKUR RAHMAN

    for moving from one subdomian to another is it safe to use Softaculous Apps Intaller clone installation options?

    • WPBeginner Support

      We have not fully tested that but there should not be a major issue when using it.

      Admin

  4. Ram E.

    Another helpful guide! Although I find it a bit complicated.

    I set up a staging environment before switching to Wordpress 6.4 using the Softaculous Apps Intaller on Bluehost. It was easy to do with a click, although you have to make sure first that the subdomain or directory where you want to install the clone is available.

  5. Konrad

    i’ve bitten into SQL challenges before for my technical school exam, so no problem here :p also,
    there are two types of people: those who don’t backup their databases and those who will :D so start now ;)

Leave A Reply

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.