How do you rename a database linked to an existing, published php app like WordPress or OSCommerce?

  1. Back up your database.
  2. Create a new database with the new name you want in mySQL and assign a user.
  3. In phpMyAdmin go to Operations and use the "Copy database to:" option to move the structure and data to the new table by:  typing the new name in the text field, de-selecting any check boxes that are on and choosing “Go”. 
  4. Your new database should now be present in the drop down list of databases in phpMyAdmin.
  5. Back up your current app’s (WordPress or OSCommerce for example) config file.
  6. Change the information in the current config file to reflect the new database name and any username and password changes you may have made. Save with the same name.
  7.  Upload/overwrite the config file on your server in the appropriate area for your app.
  8. Check to verify that your app works with the new setup by accessing your site.
  9. Once you feel clear that everything’s hooked up and happy with the new database information you can delete your old database (and users if you created new ones.)

Posted on November 29th, 2007 | filed under mySQL / phpMyAdmin | Trackback |

Comments are closed.