WordPress usermeta not being created

I have an unusual problem.

When I create a new user in the WordPress back-end, it appears the _usermeta info isn’t being created in the database.

Read More

Usually what would happen is a row gets added to the _users table (containing ID, email, password etc…) and a bunch of rows with the corresponding ID get added into the _usermeta table (containing their name, capabilities etc…).

But as mentioned the rows for the _usermeta are not being created.

Some other facts:

  • a new row for the user does get created in the _users table for the user, but it doesn’t appear to be taking the next available ID after the latest. For example, if the latest ID in that table was 1200, then the next user added should be 1201. But it’s instead adding the row earlier in the table.

  • this database was exported from the site when it was on my previous host (a couple of days ago), where it used to work fine. I’m guessing something happened during the dump?

Some things I have tried to fix it:

  • Disabling all plugins.
  • Different theme (no functions)
  • WordPress database repair

Any help would be appreciated.

Related posts

Leave a Reply

1 comment

  1. Solved. For some reason auto increment had disappeared from the structure. I added it and now it’s all fine.

    Though is anyone can explain, how could this go missing during the database dump?