Posted By

philiph on 02/03/09


database wordpress users share

Versions (?)

Who likes this?

2 people have marked this snippet as a favorite


Shared login in Wordpress

 / Published in: PHP

paste it in wp-config.php and make sure the prefixes are right (wp_* is default) also the blogs must be installed on the same database with different prefixes.

For example, you might have a primary blog with the table prefix wp_ on the database wordpressblog and you install a new blog on the same wordpressblog database but with a different prefix (this is important) - you can share the the primary blogs already populated user tables (in other words a shared login).

  1. define('CUSTOM_USER_TABLE','wp_users');
  2. define('CUSTOM_USER_META_TABLE', 'wp_usermeta');

Report this snippet  

You need to login to post a comment.