0

I am trying to implement the shared user db trick as outlined here.

http://xentek.net/articles/528/implementing-the-wordpress-shared-users-table-trick/

On step 3, I get the following screen. It tells that the "User already exists" but when I submit it get the error "please provide a valid username" and it won't let me set up the site. Any suggestion on why this is happening or a better way to debug what is going on behind the scenes?

screenshot

  • 1
    I don't think that that tutorial is valid any more, might be wrong, but really, 2009. – Pieter Goosen May 1 '14 at 19:42
  • The post is old but, the Configuration should still be valid. codex.wordpress.org/… – jbrass May 1 '14 at 22:09
0

I believe this is due to WordPress already seeing an admin user in the global user table, so on install, it won't show a spot for a username. I was actually just messing with this exact same setup, and came across the same issue.

  1. If these are two both brand new site setups, you could delete the data in your users and usermeta table, and start the process of installing your second WordPress site. It should then give you the option to fill in all of the values for an admin user. Once installed, the new user you created will be an admin of your SECOND site only.

  2. Once installed, you will need to add some records into your usermeta table for your FIRST site installed. You should see two records in your usermeta table with meta_keys of "{table_prefix_of_second_site}_capabilities" and {table_prefix_of_second_site}_user_level. You will need to make the same key value pair for your FIRST site with the key of {table_prefix_of_first_site}_capabilities and value of a:1:{s:13:"administrator";b:1;}, then another row with a key of {table_prefix_of_second_site}_user_level with a value of 10.

You should then be able to login to both sites with the admin user.

  • I have tried this workflow as well as both sites are established. I have added the values to the wp_usermeta table into the FIRST site for the SECOND site. I have also disabled all plugins. The value for SECONDSITE_user_level is getting reset from 10 to 0 on login, and I get "you do not have permissions" when trying to access the admin. Although I am able to login to the front-end of the site. – jbrass May 1 '14 at 22:12
  • Just a thought... There are many reasons not to use 'admin' as the administrator username as obviously hackers are going to target this first. Try creating a unique admin name on the original site, then deleting user: 'admin' and then try again. – TomC May 2 '14 at 6:55
  • I am not using 'admin'. – jbrass May 2 '14 at 18:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.