Few days ago we showed students and new users steps to export and import MySQL and MariaDB databases. Today’s post uses cPanel and phpMyAdmin to accomplish the same goal.
Since a huge majority of WordPress setups use MySQL or MariaDB databases, this post also applies to those settings. In fact, as long as phpMyAdmin can connect to the database, it doesn’t matter what the database server is, you should be able to use the tool to get the job done.
For those who don’t know what phpMyAdmin is, it is an opensource web based tool that allows anyone to manage MySQL, MariaDB and other databases easily from their web browsers. Instead of trying to understand SQL queries, use your web browsers to manage the databases instead.
Step 1: Exporting MySQL or MariaDB databases
Exporting WordPress databases is crucial for someone migrating or backing them up. When you’re backing up your databases, you export them. You can then import those databases when needed in times of trouble.
To export a database using phpMyAdmin, logon to cPanel (your host provider should give you access to cPanel), and navigate to the databases section and select phpMyAdmin as shown in the image below.
After clicking the phpMyAdmin link, it should take you to a page with all your databases listed on the left. Select the database you wish to export, then select Export from the top menu and the Go button highlighted in the image below.
Doing that should open a dialog box for you to choose a location to store the database content. Once the content is stored, you can then put it somewhere to keep safely or move it to another host and import it. This is how one exports databases using phpMyAdmin.
Step 2: Import MySQL or MariaDB databases
Now you know how to export databases via phpMyAdmin.. let’s go and import the database we just exported. Some reasons you may want to import MySQL or MariaDB databases are, your website was compromised and you want to restore your database, an error that cause your website to not functioning and many others.
When you find yourself in similar situations, your best bet would to restore your databases by importing them onto the same host or a different host.
To import a database, you first create a blank database using the same name as the one exported. Then open phpMyAdmin and select the blank database, click Import from the top menu, browse for the database file you’re importing and click the Go button.
Doing this will import and restore the database that was exported earlier.
That’s it! This is how to export and import databases using phpMyAdmin.
You may also like this post:
Students Tutorial – Importing and Exporting MySQL or MariaDB Databases