Duplicate your WordPress database using phpMyAdmin

Would you like to duplicate your WordPress database using phpMyAdmin? WordPress stores all your website data in a MySQL database. Sometimes you may need to quickly clone a WordPress database to transfer a website or to create manual backups. In this article, I will show you how to easily duplicate WordPress database using phpMyAdmin.

Why Use phpMyAdmin to Duplicate WordPress Database

WordPress stores all your website content in the database. Almost all WordPress hosting companies offer MySQL as your database management software. You can interact with MySQL using command line tools, but that is not ideal for beginners.

PhpMyAdmin offers a web based interface to manage your MySQL database. It can be used to manually backup your WordPress database, restore admin password, or move your website to new server.

That being said, let's take a look at how to duplicate WordPress database using phpMyAdmin.

Duplicate / Clone WordPress Database using phpMyAdmin

First, you need to visit the cPanel dashboard of your hosting account. Once logged in, scroll down to the Databases section and click on the phpMyAdmin icon.

Don't worry if your cPanel dashboard looks a little different than our screenshots, or if your hosting company doesn't have a cPanel dashboard. You just need to locate the databases section, and you'll find the option to open phpMyAdmin.

This will take you to the phpMyAdmin interface where you need to click on the Databases link on the top to continue.

On this screen, you will see a list of databases available. You need to click on your WordPress database from the list.
Next, you'll see the list of tables in your WordPress database. Click on the 'Operations'link from the top menu to continue.

Now, you need to provide a name for the new duplicate database under the 'Copy database to' box. Make sure the 'Structure and Data' option is selected and then click on the Go button.

PhpMyAdmin will now create a duplicate WordPress database for you. Once finished, you will see a success message.

After that you can click on 'Databases'

link on the top to view your newly created duplicate database.

Manually Duplicate WordPress Database using phpMyAdmin

If you are on a shared WordPress hosting, then it is likely that your hosting company does not allow users to create databases directly from phpMyAdmin.

In that case, you will not be able to see the 'Copy database to' box on the operations page.

However, you can still export the existing database and then import it into a new database. To do that, visit the phpMyAdmin in your cPanel dashboard.

After selecting your WordPress database, click on the export button on the top menu and then select custom method.

Now you need to scroll to the output section and check the 'Save output to a file' option.

Click on the Go' button to continue.

phpMyAdmin will now export your WordPress database and send it to your browser as a .mysql file.

Next, you need to create a new database where you can import this file. Visit the cPanel dashboard and click on MySQL Databases icon.

On the next screen, enter a name for your new database and click on 'Create database' button to continue.

Cpanel will now create a new MySQL database. However, in order to use the database you need to assign it to a MySQL user.

Scroll down to 'Add user to database' section and select your MySQL username and then select your newly created database.

After that, click on the Add button to continue. Cpanel will now grant the MySQL user full privileges on your newly created database.

Now that your new database is ready, you can go ahead and open phpMyAdmin from your cPanel dashboard.

You need to select your newly created database and then click on the import button from top menu.

Next, click on the choose file button to select the .mysql file you downloaded earlier and click on the Go button to continue.

PhpMyAdmin will now upload the file from your computer and import your database. You will see a success message upon completion.

I hope this article helped you learn how to duplicate WordPress database using phpMyAdmin.

how to include category and subcategory in WordPress URLs

Recently one of my readers asked me how to include category and subcategory in WordPress URLs. Categories and subcategories allow you to sort content on your website. They also allow your users to easily browse the topics they are most interested in. In this article, I am going to show you how to include category and subcategory in WordPress URLs.

Including Category to SEO Friendly URLs in WordPress

WordPress comes with two built-in taxonomies to sort your content. They are called categories and tags.

Categories are typically used for more broader topics and can have subcategories.

However, if you are using the default WordPress URL structure, then your categories and subcategories are not included in the post URLs.

Some websites use categories and subcategories in WordPress URLs for their posts. For example, at [company] we include category in the URLs of our posts like this:

http://www.aroham.com/plugins/7-best-wordpress-backup-plugins-compared-pros-and-cons/

Some websites that use subcategories display both parent and child categories in the URL.

>

http://example.com/news/national/article-title-here/

In this example, news is the parent category and national is the child category.

Including category or subcategory to your post URLs makes them more user-friendly. It matches the breadcrumb navigation on your site and it includes more keywords and text which is also helpful for SEO.

Having said that, let's see how to easily add category and subcategory in WordPress URLs.

Adding Category and Subcategory in WordPress Post URLs

First, you need to visit Settings >> Permalinks page in your WrodPress admin. There you need to click on the option under common settings area.

Next, you need to add /%category%/%postname%/ in the field next to custom structure.

After that, don't forget to click on the save changes button to store your settings.

That's all WordPress will now start including category and subcategory in WordPress URLs. You can see this in action by editing a post or creating a new one.

File that post under a category (and subcategory if you use them) and click on the update button.

You will notice category and subcategory included in the post's permalinks.

Using Multiple Categories or Subcategories

Let's suppose you file your blog posts into multiple categories or subcategories. WordPress will only include one category and one subcategory in the URL. If you didn't choose a subcategory, then it will only show one parent category.

WordPress chooses the category alphabetically. For example, if you file a post in Apple and Technology categories, then WordPress will include apple in the URL because it comes first in alphabetical order.

http://example.com/apple/article-title-here/

If you file a post in Apple' and a subcategory under that called 'Technology', then it will include both of them in the URL.

http://example.com/apple/technology/article-title-here/

If you selected a subcategory but didn't specifically select parent category, then WordPress will still include parent category in the URL.

Another scenario is when you have a parent category, subcategory, and a sub-subcategory. WordPress will include all three of them in the URL.

http://example.com/apple/technology/events/article-title-here/

I hope this article helped you learn how to include category and subcategory in WordPress URLs.

PHP Tutorial

PHP is the most popular server-side scriptiong language for creating dynamic web pages. PHP stands for Hypertext Preprocessor. PHP is a ver...