WordPress.org

Ready to get started?Download WordPress

Forums

Multiple blogs, one user list? (17 posts)

  1. DailyOrange
    Member
    Posted 7 years ago #

    I guess the topic describes it quite well: our newspaper has 7 blogs running the WP system, and each one has its own user database, as would be expected. However, for obvious reasons, our readers would probably not want to register individually for each one, and therefore would mean that most people wouldn't take the time, and would in turn not post comments. So I am wondering, would there be an enormous amount of recoding to do to make this a reality, or is there a centralized function/definition/variable that specifies the user table, which I could edit and be done with this?

  2. DailyOrange
    Member
    Posted 7 years ago #

    I should add that, until a week ago, I knew absolutely nothing about WP, so don't assume I have a clue what I'm doing, aside from a knowledge of computers/programming.

  3. DailyOrange
    Member
    Posted 7 years ago #

    buh-da-BUMP

  4. MrBobDobolina
    Member
    Posted 7 years ago #

    Hi.

    I'm struggling with the same issue here. I've been looking through the forums and all the choices and options and hacks that people are giving don't seem to work.

    I can get the user list to meld together, but I can't get the permissions to come out right.

    I think the main problem is that when you set up a custom user table and then try to install a new blog using a custom user table that is set up, it says that you have already installed the blog. Even if you haven't.

    From what I can tell, they seem to have some code that should allow this to be possible, but I don't think it's fully integrated or working yet.

    If anyone has any suggestions, I woo would be glad to hear of any. I have tried out the ones I have seen on the site, but none have worked.

    See the other thing that have wondered if maybe it would be possible to set up a page that would allow them to register for all the blogs at once, but it looks like that might be a ton more trouble then it's worth.

  5. canbebesi
    Member
    Posted 7 years ago #

    Hi I'd like to see an answer to this question as well..

    Thanks in advance..

  6. MrBobDobolina
    Member
    Posted 7 years ago #

    Well, good news and bad news... I was playing around on a test site, and I got it to work... bad news is that I can't duplicate my results. I am going to set up another install and see if I can get it running, I'll let you all know what happens.

  7. johnpannell
    Member
    Posted 7 years ago #

    Bump... in the same boat.

    I had the idea that I could delete the user and usermeta tables for all but one of the blogs, and then creating symbolic links to the remaining set of user and usermeta tables. Then when wrote to any of then (ie. a user registered or changed registration) it would be changed for all the blogs.

    That didn't work.

    Instead I now get "You do not have sufficient permissions to access this page" for the blogs whose user tables are symbolic links. ... even after setting permissions and ownership rights on the links.

    Any ideas?

  8. Kafkaesqui

    Posted 7 years ago #

    There's a (little discussed) way to define a different users table in WordPress. Note this only works if the various blogs you're combining user lists under are in the same database.

    In your wp-config.php add the following two lines somewhere *before* the line which includes wp-settings.php:

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

    In the above wp_users and wp_usermeta can be changed to whatever act as the primary tables for your blogs. If you only want to combine the users table but retain different role and capability settings under each blog, leave out the CUSTOM_USER_META_TABLE constant.

  9. johnpannell
    Member
    Posted 7 years ago #

    Tried Kafkaesqui's solution above and another possibility he wrote at http://wordpress.org/support/topic/42793?replies=8.

    Neither worked for me, unfortunately.

    Both cause this error to return, "You do not have sufficient permissions to access this page."

    All works well with the plain-vanilla default table prefixes... but of course that creates multiple user lists.

    I'll look a bit more for other ideas. Otherwise, I'm about ready to assume this is not possible for me and ove on.

  10. MrBobDobolina
    Member
    Posted 7 years ago #

    Well I didn't have time to mess with it anymore, so I ended up moving on for now, but I hope to go back and make it work.

    I had it working, and I deeply regret not writting down my steps. When I had it working though, I had it working on a new installation. I installed both, and then changed the second one's wp-settings.php file to get certain things from the other table, and it was working fine. I had trouble with the permissions, but I changed row 64 (or was it 65) of the options table that held the "user roles" to match the first blog.

    I must have done more then that though, because that didn't help me the second time.

    When I changed the wp-settings.php file I took out all the $tableprefix statements and manually put in the names for all the tables.

    Wait...

    ...

    No, I may not have done two installs, I did one install and used the SQL admin to duplicate the table, giving it a different prefix. I then changed the options of the second set of tables to point to the right home page and give it the right title...

    ...

    Drat... I've been sucked back into the problem vortex. I'm going to give this one another go if I have time tonight.

  11. johnpannell
    Member
    Posted 7 years ago #

    Because I messed something up while tinkering and couldn't figure out how to undo it, I did a reinstall on the affected subdomains.

    I was hoping this would somehow make a difference and tried the various solutions again, with the same results. So I am confident these are not solutions... at least for me and/or WordPress 2 users.

    With skepticism over my skill and patience, I'm wondering if I should give WPMU a whirl. This *could* be the answer if it works for me... I may give it a try on some test blogs.

    Thanks...

  12. johnpannell
    Member
    Posted 7 years ago #

    For what it's worth... and this may cause a lightbulb to come one somewhere...

    After trying the solutions and being unable to get on -- getting that "You do not have sufficient permissions ..." message -- on a lark I went to (blogname)/wp-admin/.

    Suprisingly, the index page for this directory came up, but without the dashboard. So, it would appear I could log in, didn't have any rights to do anything.

    Not knowing much of how WordPress works, this leads my mind towards the (prefix)_user_roles option in the options table. But I don't know how to decipher the various codes in the option_value field for this option. Anyone think/know if the solution lies here?

    Thanks again.

  13. amenadiel
    Member
    Posted 7 years ago #

    I've managed to merge the user table of two websites, and also I'm running a bridge with SMF forum, so when a user registers I have him registered on both websites plus the forum.

    What is still troubling me is that the only method that seemed to work was to point user table in wp-settings to the first one (wp_users) but if I try to do the same with the usersmeta table, I get the "You do not have sufficient permissions ..." message.

    This issue happens even if I point line 65 of the table wp2_options (of my second blog) to wp_user insteas of wp2_user_roles.

    The drawback of my implementation, is that a new user, even if he gets registered on both blogs, will still have to be moved to the "suscriber" category on the other one, and until then he would have no usermeta, being unable to log in.

    I'm running the "user online" plugin + it widget, and it show user logged on both blogs, but I had to edit the plugin code to point to the correct users table.

  14. MrBobDobolina
    Member
    Posted 7 years ago #

    ... I really wish I knew what I did when I got it to work. Although I have kind of given up on my whole idea and changed direction, it would still be nice to know...

    If I find time I'm going to try again, but I think the trick was in setting up two new blogs, the first one was installed normally, the second of which was installed, but then immediately changed within the config files to go to the other blog for posts... I dont' remember now... it's been too long...

  15. Kafkaesqui

    Posted 7 years ago #

  16. michuk
    Member
    Posted 7 years ago #

    I used the hints from this thread

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

    and I can log in with my other database login but here is what I get when I try to access the wp-admin page:

    "You do not have sufficient permissions to access this page."

    Even though my user has administrative permission.

    Any idea what might be wrong?

  17. michuk
    Member
    Posted 7 years ago #

Topic Closed

This topic has been closed to new replies.

About this Topic