This article provides a guide for how to safely rename WordPress database. This guide is intended for use with cPanel shared hosting accounts.
How to Safely Rename WordPress Database
To safely rename a WordPress database, follow the steps below:
- Login to your cPanel account.
- Navigate to the Databases section and click the "Manage My Databases" icon to access:
- Click "Rename" corresponding with the database you wish to rename:
- It is recommended to take a backup of the database prior to renaming. Do this by clicking the link:
- Enter the new database name in the "New name:" field and click "Proceed" to rename:
- Use the File Manager interface to edit file, "wp-config.php" (cPanel Home -> Files -> File Manager):
- Modify the database name in the wp-config.php file:
The line you should edit is:define( 'DB_NAME', 'your_new_db' );
Info! Replace 'your_new_db' with the new database name. - Save the file and exit the file editor.
Conclusion
You now know how to safely rename WordPress database using cPanel.