Hosting Tutorial & Guide

How to Enable Users to Delete User Accounts in WordPress

updated on Dec 19, 2017
How to Enable Users to Delete User Accounts in WordPress For most WordPress users, it is the common sense to allow the user registration system for the growth and expansion of a truly popular website. Especially, this is important for some e-commerce sites, websites having the forum section, the social media platforms and many more. Even, it is possible that some of your users are the editors or content contributors to write the quality articles for you. The reasons for having a registration system are too many and the registration process is really simple. Thus, your users can get their exclusive accounts to do something on your site. However, Will you give them the freedom to delete the accounts? If the answer is yes, you can check the following content to learn how to enable users to delete user accounts in WordPress.

By default, when people register a WordPress account, they cannot delete it. But only you, the website administrator, have the permission to stop the account. If your users want to do so, they have to contact you using the available contact method to ask for the deletion. In this case, to give your users more confidence on the interaction on your website, you can give them the right to stop their accounts on their own. But personally speaking, this practice should be done carefully. After all, you always want to keep them registered on your site or at least have their email address.

Enable Users to Delete User Accounts in WordPress

While WordPress itself does not allow the account deletion by users, you can achieve the function using the Delete Me plugin. This is a lightweight tool that allows you to give your users the specific permission to delete themselves from the profile page. The working schedule of this plugin looks like the following.
  • A user clicks the delete link.
  • A confirmation for the deletion will appear for the user to confirm this practice.
  • If confirm, the user account will be deleted, along with the posts, links, comments and any other things related to that account will disappear.
  • The deleted user will be redirected to the landing page or homepage. This can be changed based on your needs.

To enable this feature, you just need to click the Settings > Delete Me button. Here, you can get all the roles listed for your website. Then, you should pick up your wanted roles so as to get the freedom to delete themselves.

Delete Me Basic Settings

There is a tip that the Super Admin and the Administrator roles are excluded from this list. After all, they already have the permission to delete users in WordPress. Here, for the testing purpose, you can log out of your site and log in using a separate role. If there is a delete link available, you can get the settings up properly.

Extra Settings

Just in the same plugin settings screen, you find two extra areas - Your Profile and Shortcode. From these two sections, you can decide the below custom settings.
  • Optionally add the extra style and class of the delete link content.
  • Decide the heading and the warning message used on the confirmation page.
  • Enter button text on the confirmation page.
  • Determine where to redirect users when they finish the account deletion.
  • Show the delete link near the bottom section of the Your Profile page.

Delete Me Extra Settings

In addition, if you use the custom profile page, you can use the following shortcode to achieve the purpose. Note that the text inside the open tag and the close tag of the shortcode can be determined by you freely.

Delete Me Shortcode