Skip to content

Instantly share code, notes, and snippets.

@jiceb
Created November 20, 2013 09:48
Show Gist options
  • Save jiceb/7560529 to your computer and use it in GitHub Desktop.
Save jiceb/7560529 to your computer and use it in GitHub Desktop.
Share users database on different WordPress installs
# http://www.remicorson.com/share-users-database-on-different-wordpress-installs/
# The two worpdress installs have to be on the same database, with different table prefix
# wp-config.php form the second website :
define('CUSTOM_USER_TABLE', 'wp_users'); // wp_ is the table prefix from the first website
define('CUSTOM_USERMETA_TABLE', 'wp_usermeta'); // wp_ is the table prefix from the first website
define('COOKIE_DOMAIN', '.yoursite.com'); //replace with the first website url
define('COOKIEPATH', '/');
/* That's all, stop editing! Happy blogging. */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment