[{"data":1,"prerenderedAt":141},["ShallowReactive",2],{"\u002Fblog\u002Fcreate-wordpress-admin-account-via-sql":3,"related-\u002Fblog\u002Fcreate-wordpress-admin-account-via-sql":100},{"id":4,"title":5,"author":6,"body":10,"categories":82,"cta":86,"date":87,"description":50,"excerpt":86,"extension":88,"image":89,"imageAlt":90,"meta":91,"navigation":92,"path":93,"readingTime":94,"seo":95,"stem":97,"tags":98,"__hash__":99},"blog\u002Fblog\u002Fcreate-wordpress-admin-account-via-sql.md","Create WordPress admin account via SQL command",{"name":7,"avatar":8,"description":9},"Perlat Kociaj","\u002Fimages\u002Fperlat.jpeg","Full Stack Web Developer",{"type":11,"value":12,"toc":77},"minimark",[13,26,29,32,35,40,51,55,61,67],[14,15,16],"blockquote",{},[17,18,19,20,25],"p",{},"Locked out of your WordPress site? This guide shows you how to regain access via SQL. If you need ongoing help keeping your WordPress site running smoothly, see my ",[21,22,24],"a",{"href":23},"\u002Fservices\u002Fwebsite-maintenance","website maintenance services",".",[17,27,28],{},"There might be a time where you might bee locked out of your admin account because you either forgot the password and and reseting the is not an option because you no longer have access to that email. Or the website has been hacked and you have to create an admin account.",[17,30,31],{},"The only option is to create a user via the MySQL. But remembering the long sql query is difficult.",[17,33,34],{},"An exaple query would be like the following example:",[36,37,39],"h2",{"id":38},"create-user-account","Create User account",[41,42,47],"pre",{"className":43,"code":45,"language":46},[44],"language-text","INSERT INTO `wp_users` (`user_login`, `user_pass`, `user_nicename`, `user_email`, `user_status`,`user_registered`)\nVALUES ('admin', MD5('changeme'), 'Mr Admin', 'admin@example.com', '0','2019-12-27');\n","text",[48,49,45],"code",{"__ignoreMap":50},"",[36,52,54],{"id":53},"add-user-permissions","Add user permissions",[41,56,59],{"className":57,"code":58,"language":46},[44],"INSERT INTO `wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) \nVALUES (NULL, (Select max(id) FROM wp_users), 'wp_capabilities', 'a:1:{s:13:\"administrator\";s:1:\"1\";}');\n",[48,60,58],{"__ignoreMap":50},[41,62,65],{"className":63,"code":64,"language":46},[44],"INSERT INTO `wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) \nVALUES (NULL, (Select max(id) FROM wp_users), 'wp_user_level', '10');\n",[48,66,64],{"__ignoreMap":50},[17,68,69,70,76],{},"That is the reason I created ",[21,71,75],{"href":72,"rel":73},"https:\u002F\u002Fkociaj.com\u002Ftools\u002Fwpadmin",[74],"nofollow","WPAdmin"," (I know it is an original name) a tool to help that will generate the SQL query for you.",{"title":50,"searchDepth":78,"depth":78,"links":79},2,[80,81],{"id":38,"depth":78,"text":39},{"id":53,"depth":78,"text":54},[83,84,85],"Article","Project","Snippets",null,"2019-12-27","md","\u002Fimages\u002Fblog\u002FScreenshot-2024-07-20-at-23.38.47.png","WordPress admin account creation via SQL command",{},true,"\u002Fblog\u002Fcreate-wordpress-admin-account-via-sql",1,{"title":5,"description":96,"ogImage":89},"Quickly create a WordPress admin account via SQL or WP CLI. Ideal for developers needing instant site access without hassle.","blog\u002Fcreate-wordpress-admin-account-via-sql",[],"6LMXcIs67v03IS_QOU8VXEZv3YKlX0QtQneAyA4xpdE",[101,105,109,113,117,121,125,129,133,137],{"title":102,"path":103,"categories":104},"Do I Really Need HTTPS? What Happens If My Website Is Not Secure","\u002Fblog\u002Fdo-i-really-need-https",[83],{"title":106,"path":107,"categories":108},"How Much Should a Business Website Cost? What You Are Actually Paying For","\u002Fblog\u002Fhow-much-should-a-business-website-cost",[83],{"title":110,"path":111,"categories":112},"How Often Should I Update My Website? A Realistic Guide for Business Owners","\u002Fblog\u002Fhow-often-should-i-update-my-website",[83],{"title":114,"path":115,"categories":116},"What Is Website Hosting and Does It Really Matter? A Non-Technical Guide","\u002Fblog\u002Fwhat-is-website-hosting-and-does-it-matter",[83],{"title":118,"path":119,"categories":120},"Why Did My Website Get Hacked? Common Causes and What To Do Next","\u002Fblog\u002Fwhy-did-my-website-get-hacked",[83],{"title":122,"path":123,"categories":124},"Why Do Emails From My Website Go to Spam? What Business Owners Need to Check","\u002Fblog\u002Fwhy-do-emails-from-my-website-go-to-spam",[83],{"title":126,"path":127,"categories":128},"Why Does Google Not Show My Business Website? A Plain-English SEO Checklist","\u002Fblog\u002Fwhy-does-google-not-show-my-business-website",[83],{"title":130,"path":131,"categories":132},"Why Does My Contact Form Stop Working? Common Causes and Easy Fixes","\u002Fblog\u002Fwhy-does-my-contact-form-stop-working",[83],{"title":134,"path":135,"categories":136},"Why Does My Site Look Broken on Mobile? The Most Common Non-Technical Causes","\u002Fblog\u002Fwhy-does-my-site-look-broken-on-mobile",[83],{"title":138,"path":139,"categories":140},"Why Is My Website Slow? 7 Simple Things That Usually Cause It","\u002Fblog\u002Fwhy-is-my-website-slow-7-simple-things-that-usually-cause-it",[83],1777992044463]