In computing, Database refers to an organized set that store and organize data. WordPress is written using PHP as its scripting language and MySQL as its database management system. MySQL is a software used to create databases, store and get data when requested.
All WordPress hosting providers offer MySQL database. Sometimes you need to create manual backups or transfer a website. At both situations, you prefer cloning a WordPress database. Not only these, there are various situations where you may need to copy your WordPress database.
Before moving further, I recommend keeping backup and manage your website. Check out our list of the best WordPress backup plugins.
phpMyAdmin is the most popular free and open source tool that handles MySQL administration. So, you can use phpMyAdmin to manually backup your WordPress database, restore admin password, or move your website to the new server.
Duplicate WordPress Database using phpMyAdmin:
- Login to cPanel dashboard of your hosting account.
- Select Databases section and click phpMyAdmin icon. A phpMyAdmin interface will appear to you.
- Now, click on Databases on the top.
A list of Databases will appear from which you have to select your WordPress database.
- A list of tables in your DataBase will appear.
- If you have multiple databases, then you must select the one you want to copy.
- Now click on Operation from the top menu.
- Provide a valid name for duplicating database into Copy database to box.
- Ensure you have selected Structure and Data option.
- Click Go.
PhpMyAdmin will now create a duplicate WordPress database. Once done, it will display a message box with success message.
How to Manually Duplicate WordPress Database using phpMyAdmin?
There is another way for duplicate WordPress database. Yes, you can manually create a duplicate database using phpMyAdmin. This option will be especially helpful for those, who use WordPress shared hosting.
Most often, WordPress shared hosting provider does not allow users to create databases directly from phpMyAdmin. Thus, users cannot copy a database to’ box on the operations page.
At such condition, follow these steps:
- Visit the phpMyAdmin from cPanel.
- Select your WordPress database.
- Now select Export button from the top menu.
- It will ask you to choose either Custom or Quick exporting method. Select Quick one.
- Click Go.
If you want custom export then choose Custom then.
- Scroll down to the Output section.
- Here you to select the ‘Save output to a file’ option. Click Go.
phpMyAdmin will export your database and send to your browser in .mysql file format.
Next task you have to do is creating a new database to import this exported database. To do so,
- Go to cPanel dashboard and click on ‘MySQL Databases’.
- A screen will appear, where you have to insert a name for your new database.
- Click Create database button.
A new MySQL database will be created.
- Now assign a MySQL user. To do so, go to Add user to database section.
- Select your MySQL username and select your newly created database.
- Click Add.
Your database is ready to use now.
- Goto phpMyAdmin
- Now Select your database and click on Import from the top menu.
- Click on the choose file button to select the .mysql file you downloaded.
- Click on Go.
PhpMyAdmin will now import your database. Once done, you will receive a success message.
So, this is how you can duplicate WordPress database by using phpMyAdmin. I hope, this guide helped you best in cloning your WordPress database.