{"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-11-11T06:31:28","modified_gmt":"2026-11-11T06:31: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\">Reset WordPress user roles and capabilities at Hostinger with WP-CLI to restore deleted or damaged roles, such as <strong>Administrator<\/strong> or <strong>Editor<\/strong>. Connect via SSH, check the existing roles and capabilities, then reset one role or all roles to their defaults.<\/p>\n<h2 id=\"h_f396ae0005\">Step 1 \u2013 Connect via SSH<\/h2>\n<p class=\"no-margin\"><b><a data-click-id=\"hgr-post-content-link-connect-to-your-account-via-ssh\" class=\"intercom-content-link\" href=\"\/support\/1583245-how-to-connect-to-a-hosting-plan-via-ssh-in-hostinger\/\" target=\"_blank\" rel=\"noopener\">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>\n<pre><code>cd ~\/domains\/domain.tld\/public_html<\/code><\/pre>\n<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>\n<h2 id=\"h_077940470d\">Step 2 \u2013 Check existing user roles &amp; capabilities<\/h2>\n<h3 id=\"h_ae6612477a\">Checking roles<\/h3>\n<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>\n<pre><code>wp role list<\/code><\/pre>\n<div class=\"intercom-container\"><img decoding=\"async\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/55\/2025\/05\/34fc76c5-9423-4ce1-8078-4ce6f01efa4a.jpg\/public\" alt=\"Hostinger terminal showing wp role list output with WordPress roles and capabilities\" data-media-id=\"1821\" \/><\/div>\n<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>\n<div class=\"intercom-interblocks-callout\" style=\"background-color: #e3e7fa80;border-color: #334bfa33\">\n<p class=\"no-margin\">Your website\u2019s plugins may create additional roles. For example, <b>WooCommerce<\/b> users may find additional <b>\u201cCustomer\u201d<\/b> and <b>\u201cShop Manager\u201d<\/b> roles available on their website.<\/p>\n<\/div>\n<h3 id=\"h_f25e935b0d\">Checking capabilities<\/h3>\n<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>\n<pre><code>wp cap list administrator<\/code><\/pre>\n<p class=\"no-margin\">To check other roles, simply replace <code>administrator<\/code> with the name of the role you want to check.<\/p>\n<div class=\"intercom-container\"><img decoding=\"async\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/55\/2025\/05\/8636d2ce-f96c-463a-b143-d1ff9e743553.jpg\/public\" alt=\"Hostinger terminal showing wp cap list administrator with WordPress administrator capabilities\" data-media-id=\"1824\" \/><\/div>\n<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 data-click-id=\"hgr-post-content-link-wordpress-roles-and-capabilities-documentation\" class=\"intercom-content-link\" href=\"https:\/\/wordpress.org\/documentation\/article\/roles-and-capabilities\/\" target=\"_blank\" rel=\"noopener\">WordPress Roles and Capabilities documentation<\/a><\/b> for a complete list of default capabilities per role.<\/p>\n<\/div>\n<h2 id=\"h_68b370ea60\">Step 3 \u2013 Resetting roles &amp; capabilities to default settings<\/h2>\n<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>\n<pre><code>wp role reset administrator<\/code><\/pre>\n<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>\n<div class=\"intercom-container\"><img decoding=\"async\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/55\/2025\/05\/e3042393-9bf2-436f-96c1-1963c6fb13ff.jpg\/public\" alt=\"Hostinger terminal showing wp role reset administrator success message\" data-media-id=\"1823\" \/><\/div>\n<p class=\"no-margin\">Alternatively, we can <b>reset all roles and their capabilities<\/b> with a single command:<\/p>\n<pre><code>wp role reset --all<\/code><\/pre>\n<div class=\"intercom-interblocks-callout\" style=\"background-color: #fed9db80;border-color: #fd3a5733\">\n<p class=\"no-margin\">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 data-click-id=\"hgr-post-content-link-have-a-backup\" class=\"intercom-content-link\" href=\"\/support\/2298928-how-to-create-backups-at-hostinger\/\" target=\"_blank\" rel=\"noopener\">have a backup<\/a><\/b>.<\/p>\n<\/div>\n<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<p>Once your roles are restored, users regain the WordPress Admin area options their role allows. If you still can\u2019t access the WordPress Admin area, see <a data-click-id=\"hgr-post-content-link-troubleshooting-issues-accessing-wordpress-admin-login-page\" href=\"https:\/\/www.hostinger.com\/support\/9662155-troubleshooting-issues-accessing-wordpress-admin-login-page-at-hostinger\/\">Troubleshooting issues accessing WordPress admin login page at Hostinger<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Reset WordPress user roles and capabilities at Hostinger with WP-CLI to restore deleted or damaged roles, one at a time or all at once.<\/p>\n","protected":false},"author":581,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_content_updated_date":"","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":5,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/325\/revisions"}],"predecessor-version":[{"id":25178,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/325\/revisions\/25178"}],"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}]}}