Sometimes you need to rename a database, for example after a site move or to make names easier to recognise. cPanel can rename it for you, but your website must be told about the new name or it will stop connecting.
1. Log in to your cPanel account.
2. In the Databases section, click on MySQL Databases.
![]()
3. Under Current Databases, you can see a list of all your databases. Locate the Database and then click on Rename.
4. Change the database name and click on Proceed.
Update your website after renaming
Change the database name in your site’s configuration file. For WordPress, edit DB_NAME in wp-config.php. Until you do, the site will show a database connection error.
Check users and privileges
After renaming, open MySQL Databases and confirm your database user still appears next to the database with the right privileges. Add it again if not.
Take a backup first
Download a database backup before renaming so you have a safe copy if something goes wrong.
Frequently asked questions
Will renaming change my data? No. The tables and content stay the same. Only the database name changes.
Why does my site show a connection error after renaming? The configuration file still points to the old name. Update it to the new name.
Does the account prefix stay? Yes. cPanel keeps your username prefix at the front of the name.
Related guides
- Create a database in cPanel
- Create a database username
- Add a user to a database and grant privileges
- Delete a database in cPanel
Need cPanel hosting in Kenya? See KickHost hosting plans or contact our team.
Found this useful? Share it.
