Database Structure on Different Servers

I don’t think WordPress can manage two databases at the same time (unless you tweak it significantly, by means of HyperDB1). So, you’d probably will like the job of abstracting two databases and making them look like one to WordPress to be done by the database functionality.

WordPress can work mostly with MySQL (see WordPress Requirements).

So, your only option is for MySQL to proxy your users table to another MySQL server. This can actually be done.

From the documentation of MySQL’s FEDERATED Storage Engine

The FEDERATED storage engine lets you access data from a remote MySQL database without using replication or cluster technology. Querying a local FEDERATED table automatically pulls the data from the remote (federated) tables. No data is stored on the local tables.

So, in theory2, you could have your users in a different server than the rest of the data, and still let WordPress work (transparently).


If you’re using PostgreSQL, (via PostgreSQL for WordPress (PG4WP)3, for instance) you can do the same thing by means of a FOREIGN DATA WRAPPER. A foreign data wrapper (FDW) can connect to either another PostgreSQL server or other types of database servers.

From PostgreSQL’s wiki page about Foreign data wrappers

In 2003, a new specification called SQL/MED (“SQL Management of External Data”) was added to the SQL standard. It is a standardized way of handling access to remote objects from SQL databases. In 2011, PostgreSQL 9.1 was released with read-only support of this standard, and in 2013 write support was added with PostgreSQL 9.3.

There are now a variety of Foreign Data Wrappers (FDW) available which enable PostgreSQL Server to different remote data stores, ranging from other SQL databases through to flat file.

FDW are based on the standard SQL/MED.

Check also CREATE FOREIGN DATA WRAPPER and postgres_fdw, for PostgreSQL to PostgreSQL connections.


1The fact that HyperDB hasn’t been updated for more than 2 years isn’t encouraging.
2I’ve never tried it.
3Three years without updates… again not encouraging