Accidentally deleted all wordpress users

To recreate wordpress users, just do this:

where "mypass" is your chosen password: this creates an admin user with user ID 1.

INSERT INTO wp_users (ID, user_login, user_pass, user_nicename, user_email, user_url, user_registered, user_activation_key, user_status, display_name) VALUES (1, 'john', MD5('mypass'), 'john', 'john@ostrowick.co.za', '', NOW(), '', 0, 'John');

To enable them to edit the site:

INSERT INTO wp_usermeta (user_id, meta_key, meta_value) VALUES (1, 'wp_capabilities', 'a:1:{s:13:"administrator";b:1;}');


Popular posts from this blog

bash + python script to find wordpress malware and delete it.

forcing deactivating of plugins via mysql

enabling web interface updates over FTP or directly