We had an accident and the table wp_usermeta got truncated.

I have the table wp_usermeta from the staging environment I pushed it in but when I try to login with the admin user (id 1 on both of them)

I'm getting this message:

Sorry, you are not allowed to access this page.

I'm being able to login but that's shown on the wp-admin home page

Thanks a lot for any ideas

1 Answer 1


Try it:

INSERT INTO `wp_usermeta` VALUES (NULL, '1', 'wp_capabilities', 'a:1:{s:13:"administrator";s:1:"1";}');
INSERT INTO `wp_usermeta` VALUES (NULL, '1', 'wp_user_level', '10');

Your Answer

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

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