Forums

[resolved] Adding new user assigns it an invalid ID of 0 (7 posts)

  1. ClickfireCoder
    Member
    Posted 1 year ago #

    I'm just trying to add a new user through the admin console. I looked in the wp_user table, and I see it's giving the new user and ID of 0. When I try to do anything with the new user, it gives me an invalid ID message. I added a dummy user in the hopes of it getting that useless ID, and then hopefully, it would give the new user an ID of 2, but it says the new user has been created, but it doesn't add any users or data to the tables. I'm at a loss. Anyone else ever had this problem and know how to fix it?

    Thanks!
    Holli

  2. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    Have you tried:

    - deactivating all plugins to see if this resolves the problem? If this works, re-activate the plugins one by one until you find the problematic plugin(s).

    - switching to the default theme to rule out any theme-specific problems?

  3. ClickfireCoder
    Member
    Posted 1 year ago #

    Thanks esmi. It's a new install with no plugins activated yet and still on the default theme. :(

  4. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    Try re-uploading all files & folders from a fresh download of WordPress.

  5. ClickfireCoder
    Member
    Posted 1 year ago #

    Just did that. No change. This is crazy. Do you happen to know what core php file adds new users? I've been searching, but haven't been able to find where it writes to the database yet. Thanks!

  6. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    If you've uploaded fresh files, it's not a core file issue. Perhaps it's your database? Try setting up a fresh db and editing your wp-config.php file to point to it. Then re-run the install via wp-admin/install.php and see if you can replicate the problem using a fresh database?

  7. ClickfireCoder
    Member
    Posted 1 year ago #

    Well, reinstalling the database seemed to do it! I looked and the usermeta table is a little different. I have no idea how that could have gotten corrupted. Thanks for all your help esmi!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags