{"id":794,"date":"2022-02-24T12:57:33","date_gmt":"2022-02-24T18:57:33","guid":{"rendered":"https:\/\/ma.rcbla.se\/blog\/?p=794"},"modified":"2022-02-24T13:00:08","modified_gmt":"2022-02-24T19:00:08","slug":"change-wordpress-user-id","status":"publish","type":"post","link":"https:\/\/ma.rcbla.se\/blog\/2022\/02\/change-wordpress-user-id\/","title":{"rendered":"Change WordPress user ID"},"content":{"rendered":"<p>This is usually needed in order to secure the default admin user which has a user_id of 1.<\/p>\n<p>Run these two mysql queries via your favorite interface.<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">UPDATE wp_users SET ID = 666 WHERE ID = 1;<\/pre>\n<p>then&#8230;<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">UPDATE wp_usermeta SET user_id = 666 WHERE user_id = 1;<\/pre>\n<p>Please note: you can use any number you want for the user_id as long as it doesn&#8217;t correspond to that of an existing user. I just chose the most metal user_id for this example. \ud83e\udd18.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is usually needed in order to secure the default admin user which has a user_id of 1. Run these two mysql queries via your favorite interface. UPDATE wp_users SET ID = 666 WHERE ID = 1; then&#8230; UPDATE wp_usermeta SET user_id = 666 WHERE user_id = 1; Please note: you can use any number [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11,65],"tags":[],"class_list":["post-794","post","type-post","status-publish","format-standard","hentry","category-coding","category-sysadmin"],"_links":{"self":[{"href":"https:\/\/ma.rcbla.se\/blog\/wp-json\/wp\/v2\/posts\/794","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ma.rcbla.se\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ma.rcbla.se\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ma.rcbla.se\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/ma.rcbla.se\/blog\/wp-json\/wp\/v2\/comments?post=794"}],"version-history":[{"count":4,"href":"https:\/\/ma.rcbla.se\/blog\/wp-json\/wp\/v2\/posts\/794\/revisions"}],"predecessor-version":[{"id":798,"href":"https:\/\/ma.rcbla.se\/blog\/wp-json\/wp\/v2\/posts\/794\/revisions\/798"}],"wp:attachment":[{"href":"https:\/\/ma.rcbla.se\/blog\/wp-json\/wp\/v2\/media?parent=794"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ma.rcbla.se\/blog\/wp-json\/wp\/v2\/categories?post=794"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ma.rcbla.se\/blog\/wp-json\/wp\/v2\/tags?post=794"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}