• I’ve scoured Google and the forums here and can’t seem to find anybody looking to do the same thing (or I just can’t seem to find the right search keywords to bring it up).

    What I would like to do is use a different table prefix for each blog that I create on my network.

    For instance, before I installed, in the wp-config.php file, I changed the $table_prefix = 'wp_' to a custom value for the parent site and now I want each individual subsite to have it’s own prefix that I specify instead of having WordPress use the defaults, e.g. wp_2, wp_3, etc.

    Any ideas?

Viewing 6 replies - 1 through 6 (of 6 total)
  • The value you set for $table_prefix will be used throughout the database. Instead of wp_2 you’ll get custom_2. There isn’t a way to have the $table_prefix be different for each blog.

    Thread Starter spartanv7

    (@praeix)

    Hmm, that’s unfortunate. If you’re running a large number of sites all from the same database, the thing could get pretty messy.

    Maybe I’m being too anal, but I would like to be able to easily identify each blog in the database by their prefix rather than sift through the blog id’s and try and match it up to the table prefix.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    You’re being too detailed oriented ??

    The table prefix is for the Network as a whole. The DB number is for each sub-site.

    Maybe I’m being too anal, but I would like to be able to easily identify each blog in the database by their prefix rather than sift through the blog id’s and try and match it up to the table prefix.

    Yeah, you’re being too anal. ??

    Cuz even if you could do what you want, you’d *still* have to look up what prefix you’re using for each blog, so how is that any less work than looking up the blogID? Which matches in the db?

    As someone who works with a large(ish) network, you’re not going to be in the db all the time.

    If you’re really set on this, a shorter way around is do separate installs in one db, then you can have each blog have whatever prefix you like, and do a shared user table.

    Thread Starter spartanv7

    (@praeix)

    @andrea_r: True, but it’s easier to remember what prefix you assign each blog, than remember the ID number associated with it (shades of DNS, if you will…) ??

    I won’t be in the database *all* of the time, but I will be doing custom work in there and if there was an option to set the table prefix for each blog that you create, upon creation, that would be convenient.

    If you’re really set on this, a shorter way around is do separate installs in one db, then you can have each blog have whatever prefix you like, and do a shared user table.

    Would doing it this way still allow one central dashboard to manage each blog?

    Would doing it this way still allow one central dashboard to manage each blog?

    No, but other than the sites list multisite doesn’t have that either.

    You can also get the ID of each blog in multisite in the admin area. I have ADD, so if I can remember the ID of a blog for long enough to navigate to the next tab where I have phpmyadmin open, I think others can handle it. ??

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Unique Table Prefix Per Blog’ is closed to new replies.