• I have 6 blogs that I would like to have share a single user database that will allow them to login simultaneously and only create one user name and login password.

    After looking through the forums, I tried these instructions posted a few years ago, but it was not successful in doing what I want:

    I use just the same setup, since I run an English and a German blog, and didn’t want to maintain two sets of users.
    The table names are set in wp-settings.php, by concatenating the table prefix from wp-config.php and the table-specific names.
    In my case, I first configured my English blog, with a table prefix of “wp_wnp_en_”, and created a number of users.
    Then I configured my German blog with a table prefix of wp_wnp_de, and AFTER RUNNING INSTALL, I made the following changes:
    1. In the wp-config.php file for the German blog I added this line under the line setting the table prefix:

    $tableusers = “wp_wnp_en_users” ;

    2. In the wp-settings.php file, I wrapped the line

    $tableusers = $table_prefix . ‘users’;

    in an if-statement which only sets it here if it hasn’t been set yet:

    if ( $tableusers == “” )
    {
    $tableusers = $table_prefix . ‘users’;
    }

    Two important observations:
    — when setting up a new blog, DO THIS AFTER running php-admin/install.php. Otherwise install.php will bomb
    on the attempt to create the already existing table.
    — be aware that everyone in this usertable will have the same rights on all blogs thus modified, so this is really only good for multiple blogs run by the same person (as in my multilingual scenario).

    Please let me know a better way to do this.

    Thank you!
    ~RCW

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter cb-rcw

    (@cb-rcw)

    Anyone have any thoughts about this?

    First of all, are all of these blogs hosted on the same server? If not, it’s going to be difficult (though I would imagine not impossible) to share a single user base across them.

    If they are hosted on the same server, have you considered using a WordPress Multi Site configuration?

    Thread Starter cb-rcw

    (@cb-rcw)

    These blogs are all on the same server. I have them all using the same database.

    I have no idea how to do a multi site configuration – so, no, I haven’t considered it…lol…

    What would you suggest?

    Many thanks,
    ~RCW

    Are all of the installations using the same database with separate table prefixes, or is each one installed in a separate database?

    Regarding multi-site, you would probably need to do some testing before actually making the changeover, but it would probably simplify things for you quite a bit. With WordPress Multi Site, you’d be using the same set of files for the WordPress core, plugins, themes, etc.; as well as a common user-base. That makes it much easier to keep things up-to-date across the multiple sites. You can start by looking at the Codex information about setting up a multi-site installation.

    Thread Starter cb-rcw

    (@cb-rcw)

    The installations are all on the same database with different prefixes, yes.

    Thread Starter cb-rcw

    (@cb-rcw)

    Okay… So, I’m working on installing the multi-site networking. I was hoping to be able to use sub-directories, but apparently my installation is too old for that, so I have to use sub-domains instead.

    When going through the instructions, I’ve gotten stuck on the fact that it wants me to make a wildcard sub-domain by using an asterisk. However, my CPanel is not letting me do this.

    Do I absolutely have to have a wildcard domain for the multi-site networking to correctly function? Or could I just create the sub-domains I need and go from there?

    Thank you!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘single user table, multiple blogs’ is closed to new replies.