Forums

2 Blogs 1 user table (4 posts)

  1. Affian
    Member
    Posted 5 months ago #

    I currently have 2 blogs in a single domain and I want ot make it so that if you sign up on one then you can use the same login on the other. I've found this http://wordpress.org/support/topic/199522 but I don't know if that will do what I want or not.

  2. stvwlf
    Member
    Posted 5 months ago #

    Yes, those are the instructions. Here is another version of the same

    Share users between two blogs
    Here are some brief notes on how to share a user table between more than one installation. All installations must be in the same database, using different table name prefixes. The prefix is set in the wp-config.php file.

    Share users between two blogs
    Put them both in the same database with different prefixes. Then choose one of them to be the master user table. Then do this in both wp-config.php files:

    define(CUSTOM_USER_TABLE,'wp_users');
    define(CUSTOM_USER_META_TABLE,'wp_usermeta');

    Replace the wp_ with the prefix you want.

    In other words, you designate the user table from ONE installation as the master user table which will be used by the other installations instead of their own user table. This PHP code must go in the wp-config.php file in all the installations that you want sharing a single user table. You can have more than two installations set up the same way. Their tables must all be in a single database however.

  3. John25
    Member
    Posted 1 month ago #

    @stvwlf

    Won't this cause a problem with plugins?

  4. cornboy3
    Member
    Posted 1 week ago #

    I merged both my users and my usermeta tables from each of my blogs into one and then proceeded to declare the custom table constants but I am getting permission errors whenever I try to attach it to my other blog :(. I wonder if there is some blog specific data in my usermeta table. Any help?

Reply

You must log in to post.

About this Topic