Locked out of WP site, cant add new admin user via SQL
-
Hi Everyone, first post, hope someone can help.
A site I developed for a friend – have been locked out for last couple of months and went to tackle today via edit of database.
Used query below and all seemed to work ok (lines confimed as added in SQL) and checked in database – could see all relevant lines and values added correctly in right places.
Query used as below: (Note: xxx covers actual value I added)INSERT INTO
wp_users
(ID
,user_login
,user_pass
,user_nicename
,user_email
,user_status
,display_name
)
VALUES (‘100’ , ‘demo5’, MD5(‘xxx’), ‘demo5’, ‘xxx@hotmail.com’, ‘0’, ‘demo5’);
INSERT INTOwp_usermeta
(umeta_id
,user_id
,meta_key
,meta_value
)
VALUES
(NULL, ‘100’, ‘wp_capabilities’,
‘a:1:{s:13:”administrator”;b:1;}’); INSERT INTOwp_usermeta
(umeta_id
,user_id
,meta_key
,meta_value
) VALUES (NULL, ‘100’, ‘wp_user_level’, ’10’);I have tried different versions of the line: a:1:{s:13:”administrator”;b:1; as I believe it was different in earlier versions. I have also checked the lines inserted via this query against another database from a similar version of WPress I have that is working and it corresponds exactly.
Php version: Version information: 3.5.8.2
Any user created as admin (no matter what I call that user and with user_level 10) is greated with a shake of the head when I try to log into the WP admin interface. Additionally, when I try to retreive p/word via web interface and add either the correctly added user or that users associate email address, it says user and / or email address dont exist.
Any help would be greatly appreciated.!!!
- The topic ‘Locked out of WP site, cant add new admin user via SQL’ is closed to new replies.