How to Allow Users to Delete Their WordPress Accounts

Do you want to allow users to remove or delete their WordPress accounts? If you allow user registration on your WordPress site, and a user does not want to retain their account anymore, then they will have to manually ask to delete their account.

Today, here at DevotePress, we will be learning the easiest ways to allow the user to delete their WordPress accounts. So let’s begin!


Allowing Users to Delete Their WordPress Accounts


The very first thing you need to do is install and activate the Delete me plugin from the WordPress Plugin Directory.

Delete me Plugin

After you’ve activated the plugin, head over to Settings > Delete Me page to configure the plugin settings.

Select

Firstly, select the user roles that can delete their own profiles. Once the account gets deleted, the plugin will redirect users to your site’s homepage.

Select options

Nevertheless, you can change that and provide a custom URL for redirect such as a Thank You page.

Also, you can choose to delete user comments as well.

Make sure to click on the Save Changes button to store your settings.

Save Changes

Now switch to a user account under the user roles you selected earlier. Once logged in, visit the Profile page. You will now see a new section where users can click Delete Account to delete their WordPress accounts.

Delete Account

Once clicked on the link, a warning box will be shown that deleting an account will remove all their access and all the content. When agreed by the user, this plugin will proceed and delete their WordPress Account.


Adding Delete Account Link to Custom User Profile Page


If you use a custom user profile page, simply add the following shortcode to allow users to delete their WordPress accounts.

[plugin_delete_me]Delete Your Account[/plugin_delete_me]

When a user deletes their account, it will also delete all their contents as posts, pages, custom post types, and move it all to trash.

A user can re-record a new account using the same email address, but this will not recover the content they added earlier. However, as a site administrator, you can recover content from trash if it is not permanently deleted.

And that is it. We hope this article helped you learn how to allow users to delete their WordPress accounts. Have anything to share or ask? Let us know in the comments section below.

 

Reference: WP Beginner

Leave a Reply

Your email address will not be published. Required fields are marked *