Support » Installing WordPress » about table-prefix

  • I do not know a lot about data bases. I had installed a blog, let say “blog1” in the intention to have two blogs in a directory in my site so I put the table prefix wp-blog1. Then decided to take a special domain name and
    aquired an additional domain at my host, so I took off
    the files from the host. Now I want to install the definitive and unique new blog “blog”. What do I do as a table prefix? Is the table prefix wp-blog1 still there and reusable? Do I install with wp- as table
    prefix or with another prefix. Do I need to distroy the table prefix wp-blog1? All of the many questions I would like to be answered before installing “blog”. Thank you.

Viewing 4 replies - 1 through 4 (of 4 total)
  • I’m a little confused by your wording here – it’s kind of all over the place. But I’m going to make some assumptions and guesses as to what you mean – so if I’m incorrect, then please let me know.

    I’m *guessing* you already have a blog installed. Using your example, it’s located at yourdominaname/blog1 (“blog1” being the actual wordpress directory, and contains all of the wordpress files.) You wanted to be sure you associated the database to the blog in an easy-to-remember way, so in the wp-config.php file, you changed the “table prefix” link from “wp_” to “wp_blog1”

    Am I right so far?

    Going with the above assumption, now you want to install a new version of wordpress, so you will have *2* wordpress installations on the same server, but in different directories. For purposes of example, you want it to be located at yourdomainname/blog2 (and you’re still keeping yourdominaname/blog1). You want to use the same database for both blogs.

    Now, if my layout here is correct, then your question of “is blog1 prefix reusable?” – the answer is a big, fat shiny NO. Not unless you want to overwrite blog1 with blog2.

    If you want a second blog using the same database, then you need to change that tasble prefix in the wp-config.php file to “wp_blog2” and save it.

    Then, when you install, your “blog1” will still remain, but it will write *new* tables with the “wp_blog2” prefix – leaving your “wp_blog1” prefixes untouched.

    Hopefully that answers your question.

    Thanks for the answer.

    I do not want blog1. I want blog2.

    More simply: do I will have a problem installing blog2
    with the table prefix wp-? or
    do I need to overhaul blog1 (using the same prefix then
    since blog1 does not exists anymore)
    I will stop here.

    Well, if you’re *moving* your existing blog, there’s directions in the codex for doing so – like if you want to save current posts and such and moving within the same hosting space.

    But if you’re just starting out with a whole new blog, you can just start over. You *could* overwrite the existing database by keeping the same table prefix, and remove everything, but that’s like overwriting files. There’s teensy chance something could get screwed up. So if you want to get rid of the old blog all together, and create a totally new one, then I’d just drop the whole database and start all over. There’s no need to know anything about the prefixes – that’s there in case you wanted to have more than one installation on your server.

    Thank you. You answered perfectly.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘about table-prefix’ is closed to new replies.