Share login from different wordpress on the same server domain

I have 4 wordpress instances on the same server, all are something like:

domain.com/blog1

domain.com/blog2

domain.com/blogN

I’m trying to share the users from them, I don’t have access to the root folder only to the subfolders but I’m getting the following error on the sites that are not the main one:

Sorry, you are not allowed to access this page.

What I did:

  • Add the same salt keys on all the domains
  • Added on the wp-config.php at the bottom
    • define( ‘CUSTOM_USER_TABLE’, ‘blogprefix1_users’ );
    • define( ‘CUSTOM_USER_META_TABLE’, ‘blogprefix1_usermeta’ );

After I got this error the first time I did this on the database:

  • Truncate blogprefix2_users
  • Truncate blogprefix2_usermeta
  • Inserted a select from blogprefix1_users into blogprefix2_users
  • Inserted a select from blogprefix1_usermeta into blogprefix2_usermeta

I tried disabling all the plugins,

I inserted a new user onto both users and usermeta as an admin but same thing keeps happening.

I’m trying to find a way to bypass admin on wordpress to create a new user, or if somebody can thing of a code to change anything on here would be awseome.

Read more here: Share login from different wordpress on the same server domain

Leave a Reply

Your email address will not be published. Required fields are marked *