• Resolved supersaturday

    (@supersaturday)


    After configuring our website at another URL, we’ve moved our site over to our production location. Ever since doing so (about 9 months ago), the pre-existing Administrator accounts work properly, but any attempt at adding another user results in an entry in the wp_users table with ID = 0 (and if we try to add the same user again, it will create multiple identical rows in this table). No data ever gets added to the wp_usermeta table.

    In the user administration screen under the WP Dashboard, this new user shows up as a blank line, no name, no role, nothing.

    Can someone perhaps provide some clues as to what is going wrong, what we can do to add new accounts (even if via modifying the database tables) and how we can fix the situation once and for all so that the dashboard “Add User” functionality works again as it is supposed to?

    Happy to provide more details (contents of tables etc.) upon request.

    Thanks!

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • How did you migrate the database? It looks like the Users table wasn’t set up correctly. The ID column needs to be set to AUTO_INCREMENT. This query should fix the table:

    ALTER TABLE wp_users MODIFY COLUMN ID BIGINT AUTO_INCREMENT
    

    You might want to review the database description to make sure this isn’t the only issue.

    Thread Starter supersaturday

    (@supersaturday)

    Jacob, that was awesome. Indeed, it was missing the AUTO_INCREMENT, and for some reason the ID column wasn’t set up as a PRIMARY key. Once I fixed those two issues everything worked like a charm.

    I migrated the database using a procedure documented on the web – but it was 9 months ago so I don’t recall exactly where it was – I thought it was this site. Everything seemed to have worked ok, including renaming of the absolute links etc., but somehow the user table missed that one important key and increment setting.

    Thanks again!

    Thread Starter supersaturday

    (@supersaturday)

    Marking as resolved.

    @jakept I logged in just to say that your method worked! I tried so many things but fortunately came across your answer before it was too late.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Adding new users adds ID=0, not working’ is closed to new replies.