Support » Fixing WordPress » Rename MySQL Database?

  • I so far run a single site with WordPress. I am now about to start adding multiple new WP-driven sites using addon domains within my hosting account. I hadn’t anticipated that when I installed my first WP-driven site, and I gave that first MySQL database a name that I’d now prefer to change. If I can’t change it, I’ll live. But if it’s possible to change it while preserving all functionality in that WP installation, I’d like to. Is it possible? If so, how?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Assuming you can change the database name (not to be confused with database TABLE names), then after you change it you should be able to edit wp-config.php and use that new database name and WordPRess should work.

    Also see:
    Installing Multiple Blogs

    Just out of curiousity… since nobody knows what the name of your database is – why does it matter?

    It matters only for my management of what will soon be multiple database, one for each of various sites that I’ll be running all within a single hosting account.

    I was referring to the whole database name, not any particular tables. Nice to know that it should be as simple on the WP end as updating the config file. Question, then, seems to be whether it is possible to actually rename the database. I don’t see an option for that in cPanel. I guess this becomes a cPanel/hosting support question and perhaps no longer appropriate to discuss here?

    ThereĀ“s plenty of freeware for hooking up to a MySQL db if you need it (I’m using CocoaMySQL for Mac and it works great of course) Most hosts have an online app that you could use.
    I don’t see any problems with changing the db name for wp. The wp-config file even says: “// You can have multiple installations in one database if you give each a unique prefix
    $table_prefix = ‘wp_’; // Only numbers, letters, and underscores please!”

    Happy coding,





    if you have cpanel available, chances are you have phpmyadmin available as well. has some images that might help you know what you are looking for.

    If you’re using MySQL 5.1.7 or higher, it’s easy to do.

    If not, then you’ll have to shutdown MySQL and rename the directory that holds the database.

    Alternate method: Export the whole database, edit the export file to change all the database name references (if any are in there, not sure), import the tables back into a new database.

    Thanks to all for the help. I’ll see what I can do with these suggestions.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Rename MySQL Database?’ is closed to new replies.