1

Am adding users in the backend and have taken site from live environment and put into localhost (development environment), but I have noticed a few things on localhost (not sure if these problems also exist on the live environment) after setting it up.

  1. Unable to add Users, either in the backend or through the front-end. The user gets added in the wp_users table, but with an ID of 0. This is very strange, and since id = 0, there is no way to login, and it does not get shown in users table in admin.

  2. Unable to update Wordpress, as I get this error message: Another Update is already in progress. However, the online help for this does not help since I can not find core_updater.lock or auto_updater.lock name anywhere in wp_options table. It simply does not exist.

  3. Have downloaded Wordpress 4.8 (had 4.7.5) and copied all files (OVERWRITING) into the root of my local environment, and yet I am still not able to create a new user. The same behavior still exists.

  4. Have disabled all plugins, and activated the default theme in Wordpress, and still no dice on creating a new User.

All New Users get id of 0 in wp_users table. What else can be done here to find out where this problem is happening and how to fix it?

Is there a reason why the wp_users table does not use a PRIMARY AUTO INCREMENTED KEY on ID column? It would just seem like this would be more appropriate than whatever it is currently doing during inserting a new user.

  • The ID column if the wp_users table is the Primary Key and auto-incremented. If your table isn't set that way then something must've gone wrong while it was getting created. Try deleting all the tables from the database and re-installing WordPress. – Jacob Peattie Jul 25 '17 at 15:37
  • @JacobPeattie, please make an answer out of your comment – Mark Kaplun Jul 25 '17 at 17:18
1

The ID column if the wp_users table is the Primary Key and auto-incremented. If your table isn't set that way then something must've gone wrong while it was getting created. Try deleting all the tables from the database and re-installing WordPress.

  • Thanks, I wasn't aware that this was supposed to be auto-incremented in the db. It certainly did not have this column as auto-incremented key, which is very odd. I suppose the db was not backed up or imported correctly. – Solomon Closson Jul 26 '17 at 0:44
0

@Solomon, no need to redo your work and install WordPress again. Please follow the steps here https://stackoverflow.com/questions/5665571/auto-increment-in-phpmyadmin

I had exactly the same problem that you have described above. Making my ID field primary and autoincrement, solved all of my trouble.

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.