after couple months i tried to login into my website. But I noticed even after entering correct details I was not able to login. So I thought of resetting password and it also failed because of email id not found error.

Finally I decided to manually reset password from phpmyadmin.

When I opened it I can't find user and usermeta table.

I don't know how it happened or my db was hacked.

My prefix is main so I can't fine main_user and main_usermeta

I was running multisite.

I can't login to any site.

Please help me.

How add myself as admin again so that I can add users.

I don't have backup of my db.

2 Answers 2


My first guess would be to try following:

  1. Create a separate clean install of multisite
  2. Move user tables from it to your site

I vaguely remember encountering situation like this before, but not what the outcome was.

Also backup current state immediately, so at least you have that captured, in case you make things worse while attempting a fix.


Add WP-CLI to your server.

Create a new user.

wp user create foo [email protected] --role=administrator --user_pass=password

Add foo as a super admin.

wp super-admin add foo

Login with foo:password.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.