Question

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.

Was it helpful?

Solution

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.

OTHER TIPS

@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.

Licensed under: CC-BY-SA with attribution
Not affiliated with wordpress.stackexchange
scroll top