tags:

views:

33

answers:

2

I have set up a couple of WordPress sites that all share the same user table (and login cookies), however as outlined in this article: http://hungred.com/how-to/multiple-wordpress-installation-sharing-user-table-touching-wordpress-core/ you get an error about not having permission to view the admin for the other sites because of the table prefix.

The problem is this article is rather old now and the code has changed in the capabilities.php file so I can't do the hack shown. BUT I don't want to hack the core code anyway. How can I fix this problem???? Needed asap please. Thanks

EDIT: I don't want to use the WP 3.0 Multisite stuff, as this is 3 separate websites, they just share cookies and users.

EDIT2:

The main site is at http://www.paperviewmagazine.com/ and I have it setup as MS, so that I can have different sites such as Community, Job Board, Marketplace etc. (you won't be able to access these sites by the way as they are in development and password protected)

I also have stand alone installations at http://blog.paperviewmagazine.com and http://help.paperviewmagazine.com these are currently using the cookie hash and user tables as the site at www.paperviewmagazine.com

The problem is that when visiting the /wp-admin/ of the Blog or Help site I get the error about permissions. Hopefully this clears up about how I'm using both MS and stand alone WordPress sites.

+2  A: 

Are they entirely separate domains? For example, example.com and another.com?

Or are they sub-domains or directories of one single domain, like one.example.com or example.com/two?

If the latter, why not use MultiSite? That's exactly what it was designed for!

TheDeadMedic
They are on the same domain. And the reason I can't use MS is because I'm already using it. But I want to have two sep sites that use the user tables.
Cameron
So what you mean is you're using MS on one or more of the three separate sites? And MS is configured as subdomains or sub-directories? And is each separate site a subdomain or sub-directory?
TheDeadMedic
I've revised the question above to explain a bit more about the domains.
Cameron
Do you want all the users of the Multisite install to be able to log in to and administer `blog` and `help`? Or will it just be you (and/or a few select individuals)?
TheDeadMedic
A: 

Normally you would use a shared user table:

http://codex.wordpress.org/Editing_wp-config.php#Custom_User_and_Usermeta_Tables

For blog and help, use unique prefixes and define CUSTOM_USER_TABLE and CUSTOM_USER_META_TABLE in their wp-config.php files. For example, if the main site used site1 as its prefix, you would add this to wp-config.php:

define( 'CUSTOM_USER_TABLE', 'site1_users' );
define( 'CUSTOM_USER_META_TABLE', 'site1_usermeta' );

However, because one of the sites is a Multisite installation, that might screw things up. For example, I don't think the Super Admin role exists in single site installs, nor do a lot of those permissions. I hope this helps point you in the right direction.

EDIT

However, I do suggest just using MS for all sites. The only reason I could imagine not doing that would be if you want to use subdirectories in the main one but keep subdomains for blog and help. But still, I'd suggest using MS for the whole network.

John P Bloch