WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Possible Duplicate:
Shared Members between two different wordpress installations with different databases

For example I have 2 different wordpress installations with different domains and hosts. Databases are separated too (two different databases).

I want to use www.b.com mysql db tables on www.a.com wp-config.php. Is there any way to do that?

If I could register tables from a remote database, I could use that in site b:

define('CUSTOM_USER_TABLE', 'wpsiteA_users');

Can I the database connection from site A on site B?

share|improve this question

marked as duplicate by Wyck, Bainternet Oct 27 '12 at 7:25

This question was marked as an exact duplicate of an existing question.

If this is in addition to your question here: wordpress.stackexchange.com/questions/70519/… the two topics should be merged and the current question updated. – Nicole Oct 27 '12 at 3:11

I don't think there is a good reason to actually do this, but you can simply use what's in your config to point to another host.

Right from the codex page.

define('DB_HOST', 'mysql.example.com:3307');
share|improve this answer
If you do it this way wouldn't you still have to merge the two databases? And define the table prefixes differently to keep the inapstallations separate? – Nicole Oct 27 '12 at 3:09
He never said anything about merging or sharing, he just said "use", but I'll vote to close it since his other question is the same and more clear. – Wyck Oct 27 '12 at 5:47
If i use define('DB_HOST', 'mysql.example.com:3307'); , is this change all of connection for using database ? I mean, i want to get and register only remote spesific tables to current wordpress website, for example only users table. I dont want to change all of db path. I mean, can i get remote spesific table only to my web site ? If this is possible, i will use remote user table but local content for my blog post, pages or other etc... I dont want to use all of remote db. I want only use remote db spesific table. Is this possible ? Help me please. – Rasih Oct 27 '12 at 14:06
Yes this I do believe that this would change all of the connection. I don't think you can just share various tables remotely. – Nicole Oct 27 '12 at 17:39

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