Move database to a shared databasae (2 posts)

  1. deshmukh
    Posted 2 years ago #

    I am currently running WordPress 3.6. It accesses a MYSQL database (old_db) with a username (old_uname), password (old_password) and table prefix (old_tp).

    I want to keep everything else same except that I want to move to a database that is shared with other wordpress installations (new_db) with a different table prefix (new_tp) and a new username (new_uname) and password (new_password).

    So, I backed up all the files. Backed up old_db using phpmyadmin. On the server, created a new user (new_uname) with a password (new_password) and allowed it all privileges to new_db.

    In the wp_config.php, I changed DB_NAME, DB_USER, DB_PASSWORD and $table_prefix to appropriate values.

    Now, I will need to import old_db to new_db but with a different table prefix, new_tp. And this is where I am stuck. How do I do that using phpmyadmin? Will I need to edit the old_db.sql file by hand? What edits?

  2. Overflow
    Posted 2 years ago #

    I think I understand what you're trying to do.

    You could do a find and replace with your db in an editor that replaces all "wp_" with "whatever_" for your prefix. Just make sure that your config.php reflects the new prefix.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.