{"id":50384,"date":"2026-11-20T05:24:08","date_gmt":"2026-11-20T05:24:08","guid":{"rendered":"https:\/\/kickhost.com\/guides\/how-to-rename-a-database-in-cpanel\/"},"modified":"2026-11-28T06:06:24","modified_gmt":"2026-11-28T06:06:24","slug":"how-to-rename-a-database-in-cpanel","status":"publish","type":"kickhost_tutorial","link":"https:\/\/kickhost.com\/en-ke\/guides\/how-to-rename-a-database-in-cpanel\/","title":{"rendered":"How to Rename a Database in cPanel"},"content":{"rendered":"<p>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.<\/p>\n<p><strong>1.<\/strong> Log in to your cPanel account.<\/p>\n<p><strong>2.<\/strong> In the <strong>Databases<\/strong> section, click on <strong>MySQL Databases<\/strong>.<br \/> <img decoding=\"async\" src=\"https:\/\/kickhost.com\/img\/mysql-databases-icon.gif\" align=\"middle\" loading=\"lazy\" alt=\"\"><\/p>\n<p><strong>3.<\/strong> Under <strong>Current Databases<\/strong>, you can see a list of all your databases. Locate the <strong>Database<\/strong> and then click on <strong>Rename<\/strong>.<br \/><img decoding=\"async\" src=\"https:\/\/kickhost.com\/img\/rename-db.gif\" alt=\"\" loading=\"lazy\"><\/p>\n<p><strong>4.<\/strong> Change the <strong>database<\/strong> name and click on <strong>Proceed<\/strong>.<br \/><img decoding=\"async\" src=\"https:\/\/kickhost.com\/img\/change-dbname.gif\" alt=\"\" loading=\"lazy\"><\/p>\n<h2>Update your website after renaming<\/h2>\n<p>Change the database name in your site&rsquo;s configuration file. For WordPress, edit <strong>DB_NAME<\/strong> in wp-config.php. Until you do, the site will show a database connection error.<\/p>\n<h2>Check users and privileges<\/h2>\n<p>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.<\/p>\n<h2>Take a backup first<\/h2>\n<p>Download a database backup before renaming so you have a safe copy if something goes wrong.<\/p>\n<h2>Frequently asked questions<\/h2>\n<p><strong>Will renaming change my data?<\/strong> No. The tables and content stay the same. Only the database name changes.<\/p>\n<p><strong>Why does my site show a connection error after renaming?<\/strong> The configuration file still points to the old name. Update it to the new name.<\/p>\n<p><strong>Does the account prefix stay?<\/strong> Yes. cPanel keeps your username prefix at the front of the name.<\/p>\n<h2>Related guides<\/h2>\n<ul>\n<li><a href=\"https:\/\/kickhost.com\/en-ke\/guides\/how-to-create-a-database-in-cpanel\/\">Create a database in cPanel<\/a><\/li>\n<li><a href=\"https:\/\/kickhost.com\/en-ke\/guides\/how-to-create-a-database-username-in-cpanel\/\">Create a database username<\/a><\/li>\n<li><a href=\"https:\/\/kickhost.com\/en-ke\/guides\/how-to-add-a-user-to-a-database-and-grant-privileges\/\">Add a user to a database and grant privileges<\/a><\/li>\n<li><a href=\"https:\/\/kickhost.com\/en-ke\/guides\/how-to-delete-a-database-in-cpanel\/\">Delete a database in cPanel<\/a><\/li>\n<\/ul>\n<p>Need cPanel hosting in Kenya? <a href=\"https:\/\/kickhost.com\/en-ke\/web-hosting\/\">See KickHost hosting plans<\/a> or <a href=\"https:\/\/kickhost.com\/en-ke\/contact\/\">contact our team<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Rename a database in cPanel and update your website settings. Easy steps for KickHost hosting customers in Kenya.<\/p>\n","protected":false},"featured_media":0,"template":"","class_list":["post-50384","kickhost_tutorial","type-kickhost_tutorial","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/kickhost.com\/en-ke\/wp-json\/wp\/v2\/kickhost_tutorial\/50384","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kickhost.com\/en-ke\/wp-json\/wp\/v2\/kickhost_tutorial"}],"about":[{"href":"https:\/\/kickhost.com\/en-ke\/wp-json\/wp\/v2\/types\/kickhost_tutorial"}],"version-history":[{"count":2,"href":"https:\/\/kickhost.com\/en-ke\/wp-json\/wp\/v2\/kickhost_tutorial\/50384\/revisions"}],"predecessor-version":[{"id":53309,"href":"https:\/\/kickhost.com\/en-ke\/wp-json\/wp\/v2\/kickhost_tutorial\/50384\/revisions\/53309"}],"wp:attachment":[{"href":"https:\/\/kickhost.com\/en-ke\/wp-json\/wp\/v2\/media?parent=50384"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}