Keeping your WordPress database safe and organized is quite important. It holds all the information for your site and should be named in a way to make it easy to keep track of everything.

When a new WordPress database is created, you often get a default name, such as db_wordpress123. However, changing it to db_mysite can help you keep everything organized. This is even more important if you run multiple WordPress sites.

If you need to change your WordPress database name, it can be done in less than 10 minutes. Here are a few easy steps to make this change.
<h2>Editing the Database</h2>
The first step is to edit the database. Start by logging into your cPanel and finding the phpMyAdmin option.

<img class="alignnone size-full wp-image-7855" src="https://itxdesign.com/wp-content/uploads/2015/03/PHPMyAdmin.png" alt="PHP My Admin" width="507" height="114" />

Find the database you want to work with on the left side of the menu and click on it. Then, select this option and click the "Operations" tab.

<img class="alignnone size-full wp-image-7856" src="https://itxdesign.com/wp-content/uploads/2015/03/OperationsTab.png" alt="Operations Tab" width="392" height="230" />

From this menu, you will be able to rename your database. The name can include anything you want, as long as you only use letters and numbers.

After you choose the name, click the "Go" button. You will be given a pop-up to accept the change and a new database will be created.
<h2>Changing the wp-config.php File</h2>
After you have created a new name for your database, you will need to edit the wp-config.php file. This is found within the file manager in cPanel

<img class="alignnone size-full wp-image-7857" src="https://itxdesign.com/wp-content/uploads/2015/03/FileManager1.png" alt="File Manager" width="501" height="163" />

It's in the root folder of your WordPress website.

<img class="alignnone size-full wp-image-7858" src="https://itxdesign.com/wp-content/uploads/2015/03/WP-Config.png" alt="WP-Config" width="304" height="102" />

Once you find the file, right click and select "Edit." You may be given a pop-up. If so, click the "Edit" button and you will be taken to the page to edit your code for this file.

<img class="alignnone size-full wp-image-7859" src="https://itxdesign.com/wp-content/uploads/2015/03/EditPopup.png" alt="Edit Popup" width="493" height="369" />

Now, you will be looking for the code that says:

<img class="alignnone size-full wp-image-7860" src="https://itxdesign.com/wp-content/uploads/2015/03/DatabaseCode.png" alt="Database Code" width="537" height="306" />

It's often found very close to the top of the code.

Now, you will need to find the define('DB_NAME', 'your_db'); option. Here, you will need to replace your_db (which is the current name of the database) with the new name you chose in step one. Make sure to save the file and you're all done with this step.
<h2>Setting up the Database User</h2>
The last thing you need to do is click on MySQL Databases in cPanel.

<img class="alignnone size-full wp-image-7861" src="https://itxdesign.com/wp-content/uploads/2015/03/MySQLDatabases.png" alt="MySQL Databases" width="510" height="117" />

Here you will see a Databases section and you want scroll down until you fine the "Add a User to a Database" section.

<img class="alignnone size-full wp-image-7862" src="https://itxdesign.com/wp-content/uploads/2015/03/AddAUser.png" alt="Add A User" width="289" height="131" />

You will need to add the user currently assigned to your WordPress site to the new database. If you don't know what the user is, you can find it in the wp-config.php file from the line labeled with DB_USER.

Now, select the new database from the drop down box and click the "Add" button. You want to select "All Privileges" on the next page.

<img class="alignnone size-full wp-image-7863" src="https://itxdesign.com/wp-content/uploads/2015/03/AllPrivileges.png" alt="All Privileges" width="542" height="364" />

Then, just click the "Make Changes" button.

Now, all you should have to do is reactivate all your plugins and you're good to go. Visit or site and make sure it's working and you will now be more organized and a bit safer.