Tuesday, 5 December 2017

How to Allow Users to Delete their WordPress Accounts

Do you want to allow users to delete their own WordPress accounts? If you allow user registration on your WordPress site, and a user does not want to keep their account anymore, then they will have to manually ask you to delete their account. In this article, we will show you how to allow users to delete their WordPress account from their account area.

Allow users to delete their accounts in WordPress

Why Allow Users to Unregister Themselves in WordPress?

Many WordPress websites allow users to register and login. This could be membership websites, blogs that accept user submitted posts, or an online store.

Once users register their WordPress account, they cannot delete it on their own. They will have to manually ask you through a contact form to delete their information.

Website owners may want to keep the user contributed content or at least have their email address. However, if you give users control of their information, then they may feel more confident in their interactions on your website.

That being said, let’s see how to easily allow users to unregister themselves in WordPress and delete their WordPress account information completely.

Allowing Users to Delete their WordPress Accounts

First thing you need to do is install and activate the Delete Me plugin. For more details, see our step by step guide on how to install a WordPress plugin.

Upon activation, you need to visit the Settings » Delete Me page in your WordPress admin area to configure plugin settings.

Delete Me settings

First you want to select the user roles that can delete their own profiles. You can also choose link styling and text that they will see on their profile page.

By default once the account is deleted, the plugin will redirect users to your site’s homepage. However, you can change that and provide a custom URL for redirect such as a thank you page. Additionally, you can choose to delete user comments as well.

Don’t forget to click on the save changes button to store your settings.

Now you will need to switch to a user account under the user roles you selected earlier. Once logged in, go ahead and visit the Profile page, and you will see a new section where users can click to delete their account.

Delete account link on user profile page

When a user clicks on the link, they will be shown a warning that deleting an account will delete their access and all their content. Once the user agrees, this plugin will proceed and delete their account.

Adding Delete Account Link to Custom User Profile Page

If you use a custom user profile page, then this is how you can allow users to delete their WordPress account.

Simply add the following shortcode to your custom profile page template:

[plugin_delete_me]Delete Your Account[/plugin_delete_me]

Note: When a user deletes their account, it will also delete all their content (posts, pages, custom post types) and move it to trash.

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

We hope this article helped you learn how to allow users to unregister in WordPress. You may also want to see our step by step WordPress security guide for beginners.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

The post How to Allow Users to Delete their WordPress Accounts appeared first on WPBeginner.



from WPBeginner http://ift.tt/2A6ApAg
More links is https://mwktutor.com

No comments:

Post a Comment