Support » Fixing WordPress » Renaming the WP- Tables

  • Resolved skeezicks


    In preparation for multiple blogs in one database, I would like to change the prefixes of my WP tables to something more meaningful, such as blog1, blog2, etc. This is an active blog. Is there a procedure that tells how to do this, and tells which files must be manually edited (if any) to reflect the changes?

Viewing 8 replies - 1 through 8 (of 8 total)
  • What you already have – leave it alone. It’s too much trouble to change it.

    All you have to do when installing new instance of WP to modify the table_prefix in their respective config file. That’s it.

    I appreciate your comments. Let me put it another way…

    My WP database contains 2 sets of tables. The first one has an SV- prefix and contains only the WP starter post and comments. The second one has a WP- prefix and contains the blog entries of interest.

    I was thinking about exporting the WP- tables and importing them into the SV table structure. Must this be done table-by-table? Is this what you meant by “too much trouble”?

    That’s weird.
    One WP install is supposed to use on ONE set of prefixes, which is defined in the wp-config file.
    And no, you cannot “merge” the DB of two blogs.

    Yeah. I think what happened is I installed WP after editing my wp-config file by using “SV-” instead of “WP-“. That produced the SV tables with the Hello World etc.

    Then, because I wanted my blog files in the SV table structure, I imported an SQL file that I exported from my online blog (that consists of WP tables, by the way). But apparently that’s not the way to do it.

    Any suggestions on how to get the data from the WP tables into the SV tables?

    Don’t sweat it. It is not worth the trouble. Delete the empty database and that’s it.

    OK, I’ll do that. I believe what you’re telling me is that it is extremely hard and/or time-consuming to import data from one WP installation to another when thier “$table_prefix” strings are different. Is that right?

    And thanks for the help!!

    It just doesn’t work.
    What will happen when you have a post with ID#5 (which is unique for every entry!!!) in one and also a post ID#5 in the other one? Which one is going to win?

    If one DB is empty, no posts… I just don’t get it: why all this fuss about it? Delete it. Done.
    You don’t like the prefix on the remaining one? It can be changed, if you are that brave to mess around with your DB. But if you have to ask how – don’t even think. Is that clear enough?

    And for the future there is a lesson: think twice before install what prefix do you want. Not that it matters…

    As you (or maybe it was somebody else here) said, you are “anal”.

    But I wrote the book! 😉

    I’m working on a local setup of WordPress and XAMPP server, so if I booger something it’s no big loss. I’m just using it to practice and to learn. One thing I want to learn is how to change the names of the tables in WP and what other files I would need to edit in the process. That’s why in my initial post, I had hoped to be directed to some pertinent section of the codex and to the MySQL documentation, so I could get to the right area and read about it.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Renaming the WP- Tables’ is closed to new replies.