In wp-config.php
for your second site, define the following two constants:
define('CUSTOM_USER_TABLE', 'yourfirstprefix_users');
define('CUSTOM_USERMETA_TABLE', 'yourfirstprefix_usermeta');
You’ll have to add some custom logic to your second site limiting logins by user role.
Related Posts:
- Multiple developers / editors working on a site in progress
- How many users can WordPress handle?
- WordPress Unit Testing – Cannot Create Tables
- Insert data in database using form
- How to track user progress?
- When is it appropriate to create a new table in the WordPress database?
- Has parent field in the table wp_term_taxonomy has term_id or term_taxonomy_id
- Performance tips for a large user base [closed]
- BuddyPress: What’s the use of wp_bp_xprofile_data table and how does it get updated? [closed]
- Efficiency on displaying random authors based on large database
- How to update BuddyPress xprofile fields programmatically? [closed]
- Extend the wp_users table
- stdObject stored in database. How does one convert it to usable format?
- How to use user table of a different database for WordPress users?
- Database with mixed collation (utf8mb4 & utf8_general_ci)
- Subscribers to posts
- Set Display Name to first and last name (phpmyadmin SQL Query)
- Select Multiple meta_value from WP DB; Single Query
- Getting all the users who have author privilege
- Does WordPress always create unique passwords?
- Moving to another host; which tables to move in a database
- WordPress mysql table double prefixes
- In what part of the WordPress core does the users table and usermeta table get joined?
- Why is it that not all users have a ‘session_tokens’ meta_key record in the usermeta table?
- Modify Database in Multi-Site wp_usermeta table
- wp_get_current_user always returns 0 continued
- input data and output table [closed]
- Is there a smart way to obtain a list of only some selected user meta data?
- How can i customize the export personal data file?
- What Is the Proper Way to Merge Usermeta Table to a an existing WP Database?
- Import users from old WP site to new one
- Retrieve data from the database to table such as comments in the admin control panel
- How to Access wp_usermeta Data Immediately After a New User is Created
- Logins from WP users table use on another page
- MS Access to manage WordPress Database
- 2 WordPress sites with 2 databases but sharing the same users
- Convert user passwords to MD5?
- Change options table prefix only
- Query multiple tables at once?
- Does WordPress store the username as a primary key in the database?
- Is there a way to execute a php script outside WordPress?
- multiple wordpress installation with shared usertable on an different database
- Best practice to import user base (subscribers) from one website to another?
- Share users across multiple sites on same database, but with different domains
- Users table missing from Database [closed]
- Some weird users in database
- Why does changing Database Table Prefixes result in loss of content?
- How to delete a particular row in a database table
- Recovering the table wp_usermeta from users
- Can I customised default WP table
- Regenerate user_nicename column
- Should I use an additional column in the DB?
- Storing user submitted forms [closed]
- WordPress where clauses in db select
- wp_insert_user not creating account correctly when ID is manually set
- Select From wpdb – Author/User Directory page
- Will adding & modifying default WordPress table index break future WordPress update
- What is wrong here? Issue with post_id and meta_value
- Can’t log into wordpress site – I have made a new user and still cant access
- Need help with creating a searchable user data by name or specific number like ID
- Migrate Users From laravel to wordpress
- How to edit custom table data in frontend
- Display user data in numbered list
- User input to database
- how add more field to wp user and save it to database
- Move Non-WordPress users table to WordPress database
- Change user_nickname for author page link
- how restrict user to give star ratings once for a post?
- How to map data on CSV to web pages?
- create a table using user meta custom data
- How to get the id of recently registered user from database?
- How to save dropdown slection by a user in the DB
- How to get specific table by current user login
- update multiple user meta field based on another meta field
- Hash user emails in database?
- Changed meta_key value in structures, now dashboard shows zero users
- What WordPress file is saving new users to database
- Get id from database
- WordPress sync with phpbb
- import (migration) user database to wp-users
- Import Excel (or csv) Table with user-data as subscribers to wordpress
- Create hundreds of users with just ID in phpMyAdmin
- WP Multisite Users Not Linking
- Have WordPress Use a Different Database for users
- Are There Any Plans for WordPress to Support Databases Other Than MySQL?
- how can get database name in wordpress?
- Long option names fail silently?
- WordPress and automated MySQL backups to a different host
- Size article thumbnails and retrieve them directly from database
- Switching Databases in LocalHost
- How to update the values when the featured image has changed?
- Does WordPress $wpdb functions wait when table is locked?
- Importing 10 Years of Media into the WP Database
- connecting to DB from custom php file
- Clear Terms from Taxonomy for Specific Post IDs?
- WordPress security [closed]
- How to split the WordPress database?
- Only allow user to access a link once a year, based on their joining date
- Error establishing database connection error during first WordPress run
- Install WordPress with SQL database