Shared login in Wordpress

/ Published in: PHP
Save to your folder(s)

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 wordpress_blog and you install a new blog on the same wordpress_blog 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).

Copy this code and paste it in your HTML
  1. define('CUSTOM_USER_TABLE','wp_users');
  2. define('CUSTOM_USER_META_TABLE', 'wp_usermeta');

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.