{"id":9471,"date":"2026-06-03T04:49:58","date_gmt":"2026-06-03T02:49:58","guid":{"rendered":"https:\/\/mybox.com\/help\/?post_type=manual_kb&#038;p=9471"},"modified":"2026-06-03T04:49:59","modified_gmt":"2026-06-03T02:49:59","slug":"how-to-add-a-wordpress-administrator-through-the-database","status":"publish","type":"manual_kb","link":"https:\/\/mybox.com\/help\/en\/knowledgebase\/how-to-add-a-wordpress-administrator-through-the-database\/","title":{"rendered":"How to Add a WordPress Administrator Through the Database"},"content":{"rendered":"\n<div class=\"translation-block translation-block-merged\">\n<p class=\"wp-block-paragraph\">If you cannot access the WordPress administration panel, you can create a new administrator account directly in the website&#8217;s database. This method can be useful when the existing administrator account is unavailable or when access to the WordPress backend has been lost.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Before proceeding, make sure you have access to the website&#8217;s database through phpMyAdmin.<\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_86 ez-toc-wrap-left counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/mybox.com\/help\/en\/knowledgebase\/how-to-add-a-wordpress-administrator-through-the-database\/#Step_1_Access_the_Database\" >Step 1: Access the Database<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/mybox.com\/help\/en\/knowledgebase\/how-to-add-a-wordpress-administrator-through-the-database\/#Step_2_Open_the_Users_Table\" >Step 2: Open the Users Table<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/mybox.com\/help\/en\/knowledgebase\/how-to-add-a-wordpress-administrator-through-the-database\/#Step_3_Create_the_New_User\" >Step 3: Create the New User<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/mybox.com\/help\/en\/knowledgebase\/how-to-add-a-wordpress-administrator-through-the-database\/#Step_4_Grant_Administrator_Permissions\" >Step 4: Grant Administrator Permissions<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/mybox.com\/help\/en\/knowledgebase\/how-to-add-a-wordpress-administrator-through-the-database\/#What_to_Expect\" >What to Expect<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/mybox.com\/help\/en\/knowledgebase\/how-to-add-a-wordpress-administrator-through-the-database\/#Summary\" >Summary<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_1_Access_the_Database\"><\/span>Step 1: Access the Database<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<\/div>\n\n<div id=\"mybox-844891518\" class=\"mybox-content mybox-entity-placement\"><div class=\"early-access-banner-inpost\">\r\n  <div class=\"banner-left-inpost\">\r\n    <div class=\"icon-box-inpost\">\r\n      <img decoding=\"async\" src=\"https:\/\/mybox.com\/help\/wp-content\/uploads\/2026\/02\/square-info-icon.svg\" alt=\"Info\">\r\n    <\/div>\r\n    <div class=\"text-box-inpost\">\r\n      <span class=\"label-inpost\"><span class=\"translation-block translation-block-banner-text\">Early access<\/span><\/span>\r\n      <h4><span class=\"translation-block translation-block-banner-text\">Still need help?<\/span><\/h4>\r\n      <p><span class=\"translation-block translation-block-banner-text\">Contact our customer service team.<\/span><\/p>\r\n    <\/div>\r\n  <\/div>\r\n\r\n  <div class=\"banner-right-inpost\">\r\n    <a href=\"https:\/\/panel.mybox.com\/helpdesk2\/v\/list\/\" class=\"banner-button-inpost\"><span class=\"translation-block translation-block-banner-text\">Message us<\/span><\/a>\r\n  <\/div>\r\n<\/div><\/div>\n\n<div class=\"translation-block translation-block-merged\"><p class=\"wp-block-paragraph\">Log in to phpMyAdmin from the mybox Panel or by using a direct phpMyAdmin login link.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Use the database credentials assigned to your website during installation.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you need to reset the database user&#8217;s password, update the credentials in the <code>wp-config.php<\/code> file afterward. Otherwise, WordPress will no longer be able to connect to the database.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_2_Open_the_Users_Table\"><\/span>Step 2: Open the Users Table<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">In phpMyAdmin, select your WordPress database from the left-hand menu.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Locate the table ending with <code>_users<\/code>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Open the table and note the ID of the most recently created user account. The new administrator account should use the next available ID number.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In the example below, the last user has ID <code>1<\/code>, so the new administrator will use ID <code>2<\/code>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Click <strong>Insert<\/strong> at the top of the page.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_3_Create_the_New_User\"><\/span>Step 3: Create the New User<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Complete the following fields:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><th>Field<\/th><th>Value<\/th><\/tr><tr><td>ID<\/td><td>Next available ID number<\/td><\/tr><tr><td>user_login<\/td><td>Username used for login<\/td><\/tr><tr><td>user_pass<\/td><td>Password for the new account<\/td><\/tr><tr><td>user_nicename<\/td><td>Display name or author slug<\/td><\/tr><tr><td>user_email<\/td><td>User&#8217;s email address<\/td><\/tr><tr><td>user_status<\/td><td>0<\/td><\/tr><tr><td>display_name<\/td><td>Name displayed in WordPress<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">For the <code>user_pass<\/code> field, select <strong>MD5<\/strong> from the dropdown menu on the left. This allows WordPress to correctly process the password during the first login.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">After completing the fields, click <strong>Execute<\/strong>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_4_Grant_Administrator_Permissions\"><\/span>Step 4: Grant Administrator Permissions<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Open the table ending with <code>_usermeta<\/code>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Click <strong>Insert<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Enter the following values:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td>Field<\/td><td>Value<\/td><\/tr><tr><td>user_id<\/td><td>ID assigned in the previous step<\/td><\/tr><tr><td>meta_key<\/td><td>wp_capabilities<\/td><\/tr><tr><td>meta_value<\/td><td>a:1:{s:13:&#8221;administrator&#8221;;b:1;}<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Click <strong>Execute<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">While still in the <code>_usermeta<\/code> table, click <strong>Insert<\/strong> again and enter:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td>Field<\/td><td>Value<\/td><\/tr><tr><td>user_id<\/td><td>ID assigned in the previous step<\/td><\/tr><tr><td>meta_key<\/td><td>wp_user_level<\/td><\/tr><tr><td>meta_value<\/td><td>10<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Click <strong>Execute<\/strong> to save the record.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"What_to_Expect\"><\/span>What to Expect<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Once both entries have been added to the <code>_usermeta<\/code> table, the new account will have administrator privileges.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You should now be able to log in to the WordPress administration panel using the username and password created in the previous steps.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Summary\"><\/span>Summary<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">WordPress stores user accounts and permissions separately in the database. Creating a new record in the <code>_users<\/code> table and assigning administrator permissions through the <code>_usermeta<\/code> table allows you to regain access to the WordPress administration panel without modifying existing accounts.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"template":"","format":"standard","manualknowledgebasecat":[125],"manual_kb_tag":[628,1112,2176,4826,5393,5394,5395,5396,5397,5398],"class_list":["post-9471","manual_kb","type-manual_kb","status-publish","format-standard","hentry","manualknowledgebasecat-websites","manual_kb_tag-wordpress-database","manual_kb_tag-database-access","manual_kb_tag-phpmyadmin-access","manual_kb_tag-users-table","manual_kb_tag-wordpress-administrator","manual_kb_tag-create-administrator-account","manual_kb_tag-usermeta-table","manual_kb_tag-reset-database-password","manual_kb_tag-wp-config","manual_kb_tag-administrator-permissions"],"_links":{"self":[{"href":"https:\/\/mybox.com\/help\/en\/wp-json\/wp\/v2\/manual_kb\/9471","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mybox.com\/help\/en\/wp-json\/wp\/v2\/manual_kb"}],"about":[{"href":"https:\/\/mybox.com\/help\/en\/wp-json\/wp\/v2\/types\/manual_kb"}],"author":[{"embeddable":true,"href":"https:\/\/mybox.com\/help\/en\/wp-json\/wp\/v2\/users\/1"}],"version-history":[{"count":1,"href":"https:\/\/mybox.com\/help\/en\/wp-json\/wp\/v2\/manual_kb\/9471\/revisions"}],"predecessor-version":[{"id":9475,"href":"https:\/\/mybox.com\/help\/en\/wp-json\/wp\/v2\/manual_kb\/9471\/revisions\/9475"}],"wp:attachment":[{"href":"https:\/\/mybox.com\/help\/en\/wp-json\/wp\/v2\/media?parent=9471"}],"wp:term":[{"taxonomy":"manualknowledgebasecat","embeddable":true,"href":"https:\/\/mybox.com\/help\/en\/wp-json\/wp\/v2\/manualknowledgebasecat?post=9471"},{"taxonomy":"manual_kb_tag","embeddable":true,"href":"https:\/\/mybox.com\/help\/en\/wp-json\/wp\/v2\/manual_kb_tag?post=9471"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}