{"id":325,"date":"2025-05-06T09:09:25","date_gmt":"2025-05-06T09:09:25","guid":{"rendered":"https:\/\/blog.hostinger.io\/support\/2025\/05\/06\/11204114-how-to-reset-wordpress-user-roles-and-capabilities\/"},"modified":"2026-05-08T12:59:28","modified_gmt":"2026-05-08T12:59:28","slug":"11204114-how-to-reset-wordpress-user-roles-and-capabilities","status":"publish","type":"post","link":"https:\/\/www.hostinger.com\/support\/11204114-how-to-reset-wordpress-user-roles-and-capabilities\/","title":{"rendered":"How to Reset WordPress User Roles and Capabilities"},"content":{"rendered":"<p class=\"no-margin\">If your WordPress roles or user capabilities got deleted or damaged, you can <b>restore the WordPress user roles and capabilities<\/b> using <b>WP-CLI<\/b>.<\/p><p class=\"no-margin\">\n<\/p><h2 id=\"h_f396ae0005\">Step 1 &ndash; Connect via SSH<\/h2><p class=\"no-margin\"><b><a href=\"\/support\/1583245-how-can-i-log-in-to-my-account-via-ssh\" target=\"_blank\" class=\"intercom-content-link\">Connect to your account via SSH<\/a><\/b> and open the directory where you installed WordPress. For most domains, it will be the <b>public_html<\/b> folder, so to reach the path, use the following command:<\/p><p class=\"no-margin\">\n<\/p><pre><code>cd ~\/domains\/domain.tld\/public_html<\/code><\/pre><div class=\"intercom-interblocks-callout\" style=\"background-color: #e3e7fa80;border-color: #334bfa33\">\n<p class=\"no-margin\">Make sure to replace <b>domain.tld<\/b> with your domain name.<\/p>\n<\/div><h2 id=\"h_077940470d\">Step 2 &ndash; Check existing user roles &amp; capabilities<\/h2><h3 id=\"h_ae6612477a\">Checking roles<\/h3><p class=\"no-margin\">Before making any changes, we should first check the existing roles to see if any of them need to be reset. For that, we can use this command:<\/p><pre><code>wp role list<\/code><\/pre><div class=\"intercom-container\"><img decoding=\"async\" src=\"\/support\/wp-content\/uploads\/sites\/55\/2025\/05\/34fc76c5-9423-4ce1-8078-4ce6f01efa4a.jpg\" data-media-id=\"1821\" alt=\"Hostinger terminal showing wp role list output with WordPress roles and capabilities\"><\/div><p class=\"no-margin\">WordPress has five pre-defined roles: <b>Administrator, Editor, Author, Contributor, and Subscriber<\/b>. One additional <b>Super Admin<\/b> role is available on WordPress multisite networks.<\/p><div class=\"intercom-interblocks-callout\" style=\"background-color: #e3e7fa80;border-color: #334bfa33\">\n<p class=\"no-margin\">Your website&rsquo;s plugins may create additional roles. For example, <b>WooCommerce<\/b> users may find additional <b>&ldquo;Customer&rdquo;<\/b> and <b>&ldquo;Shop Manager&rdquo;<\/b> roles available on their website.<\/p>\n<\/div><p class=\"no-margin\">\n<\/p><h3 id=\"h_f25e935b0d\">Checking capabilities<\/h3><p class=\"no-margin\">If all default user roles exist, we should verify whether their capabilities are properly assigned. To do that, we can use this command:<\/p><pre><code>wp cap list administrator<\/code><\/pre><p class=\"no-margin\">To check other roles, simply replace <code>administrator<\/code> with the name of the role you want to check.<\/p><div class=\"intercom-container\"><img decoding=\"async\" src=\"\/support\/wp-content\/uploads\/sites\/55\/2025\/05\/8636d2ce-f96c-463a-b143-d1ff9e743553.jpg\" data-media-id=\"1824\" alt=\"Hostinger terminal showing wp cap list administrator with WordPress administrator capabilities\"><\/div><div class=\"intercom-interblocks-callout\" style=\"background-color: #feedaf80;border-color: #fbc91633\">\n<p class=\"no-margin\">If the output appears empty or is missing essential capabilities, your user roles may be damaged. See <b><a href=\"https:\/\/wordpress.org\/documentation\/article\/roles-and-capabilities\/\" target=\"_blank\" class=\"intercom-content-link\" rel=\"noopener\">WordPress Roles and Capabilities documentation<\/a><\/b> for a complete list of default capabilities per role.<\/p>\n<\/div><p class=\"no-margin\">\n<\/p><h2 id=\"h_68b370ea60\">Step 3 &ndash; Resetting roles &amp; capabilities to default settings<\/h2><p class=\"no-margin\">If any of the default roles or their capabilities are missing, we can use WP-CLI to reset them. To reset the administrator role and its capabilities, we can use this command:<\/p><pre><code>wp role reset administrator<\/code><\/pre><p class=\"no-margin\">To reset other roles (or their capabilities), simply replace <code>administrator<\/code> with the name of the role you want to reset.<\/p><div class=\"intercom-container\"><img decoding=\"async\" src=\"\/support\/wp-content\/uploads\/sites\/55\/2025\/05\/e3042393-9bf2-436f-96c1-1963c6fb13ff.jpg\" data-media-id=\"1823\" alt=\"Hostinger terminal showing wp role reset administrator success message\"><\/div><p class=\"no-margin\">Alternatively, we can <b>reset all roles and their capabilities<\/b> with a single command:<\/p><pre><code>wp role reset --all<\/code><\/pre><div class=\"intercom-interblocks-callout\" style=\"background-color: #fed9db80;border-color: #fd3a5733\">\n<p class=\"no-margin\"><b>Warning:<\/b> Using <code>wp role reset --all<\/code> will reset <b>all<\/b> roles on your site, including custom roles created by plugins. This will remove custom capabilities and restore the roles to their default state. Please be sure to proceed with caution and make sure you <b><a href=\"\/support\/2298928-how-to-create-backups-at-hostinger\" target=\"_blank\" class=\"intercom-content-link\">have a backup<\/a><\/b>.<\/p>\n<\/div><p class=\"no-margin\">After resetting, confirm all needed roles exist using <code>wp role list<\/code>. Then, check if the roles have restored capabilities correctly by re-running <code>wp cap list administrator<\/code>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Learn to reset WordPress roles and capabilities with WP-CLI to fix issues with missing or damaged settings.<\/p>\n","protected":false},"author":581,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"include_on_kodee":true,"footnotes":""},"categories":[179],"tags":[],"class_list":["post-325","post","type-post","status-publish","format-standard","hentry","category-wordpress-management"],"hreflangs":[{"locale":"en-US","link":"https:\/\/www.hostinger.com\/support\/11204114-how-to-reset-wordpress-user-roles-and-capabilities\/","default":1}],"include_on_kodee":true,"_links":{"self":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/325","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/users\/581"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/comments?post=325"}],"version-history":[{"count":1,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/325\/revisions"}],"predecessor-version":[{"id":1827,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/325\/revisions\/1827"}],"wp:attachment":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/media?parent=325"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/categories?post=325"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/tags?post=325"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}