0

I am inside a database and there is no users table in it. Is it possible that the site running using WordPress has no users table? Please guide. Thanks.

1

Normally WordPress does not allow you to delete 'super admin' through its dashboard, all other users can be deleted. But in your case I think, its some one who deleted all users from the table directly by accessing your WordPress database via phpmyadmin or so.

Even if there is no users in the site, the site will be running without any problem, but you would not be able to access the dashboard and change contents. Also some sections like author pages etc in the front end will not work because there are no users.

But still you can create a new admin user manually via Phpmyadmin, see this link to know how.

For those looking for a quick hint, here is the SQL query:

INSERT INTO `databasename`.`wp_users` (`ID`, `user_login`, `user_pass`, `user_nicename`, `user_email`, `user_url`, `user_registered`, `user_activation_key`, `user_status`, `display_name`) VALUES ('4', 'demo', MD5('demo'), 'Your Name', 'test@yourdomain.com', 'http://www.test.com/', '2011-06-07 00:00:00', '', '0', 'Your Name');

INSERT INTO `databasename`.`wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES (NULL, '4', 'wp_capabilities', 'a:1:{s:13:"administrator";s:1:"1";}');

INSERT INTO `databasename`.`wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES (NULL, '4', 'wp_user_level', '10');

Remember to change the databasename to the database you are working with. Also don’t forget to change the appropriate values.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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