The organization I work for would benefit if we could take the existing WordPress installations that are located on several (~5) different servers and be able to use a universal database with the users table only. The individual servers would use a database for the remaining content.

The idea is this. Have a "main" server with all of the user's data (some 300+ users) which whom a network admin can give/edit permissions to these users on each of the other servers.

This way, when a user logs in to one WordPress installation on one server, the user could visit another WordPress server and still be logged in with various permissions on the various servers.

This would be a 1:1 relationship for WordPress Network to Server. How would cookies or sessions need to be utilized in order to allow this?

Would an outside API login system need to be used in order to accomplish this? Or could this be done within the WordPress core files?

  • Why is it not possible to just use a WordPress multisite setup and combine all the servers to just one. much much easier on everyone involved. Commented Nov 7, 2012 at 19:23
  • Certain installs are too resource intensive to be able to use them all on one server. In addition to this, we have our intranet wordpress install seperate from a hosted install.
    – Jeremy
    Commented Nov 8, 2012 at 20:45
  • I would think that just paying for two server bills would be much less than five servers. Upgrade your apache server and get a mysql server. You only need to upgrade one WordPress install. Then you are able to have site wide login without creating a custom WordPress plugin. Then restrict access to subdomain/domain htaccess for intranet. Just my two cents. Good luck! Commented Nov 10, 2012 at 20:11

1 Answer 1


It may be possible. A lot of the core API that deals with logins and cookies is pluggable.

You could replace wp_set_current_user with something that queried your external database rather than the internal one, for instance.

Authentication is already done via a the authenticate filter (wp_authenticate is the function that does this, and the filter is added in wp_signout).

In short, there's plenty of ways you could hook it, do your thing and change stuff. You would lose, however, almost all of the users API (no get_users, no user admin area, etc), except for your main site, where the user functionality resides.

An alternative approach would be to have all ~5 servers/WP installs share the same, external database server and database. From there, set a custom user table in each wp-config.php, and each separate install with share the same user data. You'll also need to set a different $table_prefix for each site.

Capabilities and roles will be different on each site, due to the way WordPress stores roles/caps (they get prefixed with $table_prefix). All the core user data, namely usernames, emails and passwords, will be shared between servers.

Of course, this is just a WP multisite install without the convenience of multisite.

Multisite + a domain mapping plugin is probably what you want. Or you could role your own sunrise.php and skip the domain mapping plugin. It should be possible to put multiple applications servers running a WP install with a shared database server. Point all the domains at a load balancer that sends traffic to one of the application servers and you're done.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.