I had to do something similar. What you need to do first is in each of your config files define the table prefix … make sure that they are different.
Example: WordPress installation 1: wp123_
WordPress installation 2: wp124_
Your first installation would be your main installation the one with the user table you want to use. Then in the second installation’s config file you need to add this in it:
//Adding so that this blog uses the same user tables as the main
define('CUSTOM_USER_TABLE', 'wp123_users');
define('CUSTOM_USER_META_TABLE', 'wp123_usermeta');
Also what you need to do is put the sites in a shared database. So that the database name is the same, database user is the same, and database password is the same. Basically connection is the same. If this make sense.
What i have above is what will allow for two different WordPress installations to share the same user base.
Related Posts:
- What is the fastest way to generate a unique id number when registering a user
- How to share plugin created database tables between two WordPress sites
- SSO system between 2 WordPress installs on different servers
- Enter user registration information in the database
- multiple wordpress installation with shared usertable on an different database
- User accounts for saving form data?
- Insert Extra fields added in the front end registration form to DB
- wp_usermeta key problem
- Can’t connect to MySQL server on ‘127.0.0.1’ (10061) (2003)
- Relaunch 4.2 utf8mb4 database upgrade
- Get error messages when $wpdb->insert() returns false?
- Does dbDelta delete columns as well?
- Where can I find the database changes between WordPress versions?
- When is it appropriate to create a new table in the WordPress database?
- Special characters in WordPress UTF-8 [closed]
- How to delete outdated, wrongly sized images in _wp_attachment_metadata?
- Prevent changing the length of post_name column on WordPress Update
- Why does dbDelta() not catch MysqlErrors?
- how to transfer wordpress sql/database from local to live
- Is altering a default WordPress database table update safe?
- Get Database Credentials from within the themes file
- what to do when your WordPress database is too large?
- Change all http to https in mysql databse?
- WordPress DB: options-table –> 32 gzipcompression?
- Having issues with wp_postmeta and wp_usermeta tables too big
- WordPress site uses MyISAM, should I switch to InnoDB necessary?
- How to prevent WordPress from retrieving data for the last 10 posts in the database?
- WP Database Table to CSV file
- Uppercase to sentence case for post titles
- How to retrieve and show database table in wordpress dashboard
- Moving to another host; which tables to move in a database
- WordPress mysql table double prefixes
- Merge two WordPress installations into one, and keep posts separated?
- Moving online website to MAMP or dumb idea?
- How can I transition a site from using the Beta Tester plugin to a “normal” install?
- Storing data for a wordpress plugin
- Transient feeds and caching error
- get_tags() return an empty array after added tags with wp_insert_term()
- WordPress database import: Row size too large
- Advanced SELECT query with condtional statements
- Why do mass updates to post_content shows in front end, but not in edit screen?
- How to disable (get rid of) home page main loop entirely?
- How can I (semi) automate a database export and import to a different location?
- Insert post in another database
- Improve performance by removing unnecessary database queries
- Redirecting to old domain after migration website
- Localhost keeps redirecting to live domain
- How to get membershiplevel from WordPress Database?
- Child parent relationship inside WP DB
- Copying database tables to new database
- Duplicating Complete WordPress Install for Development and then Redeployment?
- What does wp_term_taxonomy.parent reference?
- How to combine multiple wp_insert_post into one in order to gain better performance
- How to get nav_menu_item_id and slug from wp database
- Two prefixes in database? Which one is valid?
- Is there a way to execute a php script outside WordPress?
- Problem in using wpdb
- How can I restrict php mail() to only send me one email after a db error
- pull data from a remote wordpress database
- Create database on installation
- How to delete post comments from the database via SQL statement?
- Users table missing from Database [closed]
- Why does changing Database Table Prefixes result in loss of content?
- Options on how to Display member specific data from a MS SQL database
- How to connect and insert data in database of wordpress?
- wp_option table error while importing
- wp_insert_user not creating account correctly when ID is manually set
- Installing local to live WP into subdirectory
- What is wrong here? Issue with post_id and meta_value
- Counting post and changing roles in mysql database. Query not code
- MSQL database wp_postmeta has meta key tve_revision
- Deleting empty meta key values
- Occasional Error Establishing a Database Connection
- WP 5.5, child themes, customizer and a weird cache issue
- Display user data in numbered list
- Removing old_slug and old_date from WordPress Database
- How do I change several broken URLs in a several wordpress databases in the fastest way?
- Best way to store 1 billion+ posts?
- Optimize WP site for millions of posts
- Why am I being prompted to reinstall wordpress?
- What’s the easiest way to connect external database and display data on wordpress?
- Character encoding issue – black diamond question marks on imported post excerpts
- WordPress Migration – Issue with admin panel changes
- Reinstall wordpress/mySQL caused database problem
- How To connect to the same WordPress database with different database user
- Call to a member function insert()
- I have include wp-config, should I add global $wpdb also?
- Localize strings from db
- Create a new table on the database and save parameters from a contact form
- How to have WP Search widget index dynamically generated content?
- Preventing concurrent update of data
- Redirect Issue: WordPress database
- Changing starting number of User ID
- Category not displaying in add post, edit post, and categories page.
- Creating Tables in WordPress Database
- Calling update_user_meta inside of another function doesn’t work
- $wpdb->prepare returns empty array
- Prevent creation of unused database tables?
- How to store a plain password in WordPress database in another field
- How to stop WordPress from using utf8mb4_unicode_ci collation