Skip to main content

5.4 The Profile Delete Form

The Profile Delete Form module renders a delete button that lets logged-in users permanently delete their own account, with a confirmation step before anything happens.

Deletion is permanent

When a user confirms, their WordPress account is deleted immediately using WordPress's standard user deletion. Content authored by the user is not reassigned. Test the flow with a disposable account before putting it live.

The confirmation flow

  1. The user clicks the delete button.
  2. A confirmation popup appears with a message ("Are you sure?" by default) and two buttons: confirm and cancel.
  3. On confirm, the account is deleted and a completion message is shown.

Every piece of text in this flow is editable in the module settings: the button label, the confirmation message, both confirmation buttons, and the post-deletion text.

Profile Delete Form confirmation popup with confirm and cancel buttons

After deletion

On the After deletion section you choose what happens once the account is gone:

BehaviourWhat the user sees
NoneThe completion message only.
ButtonA close button linking to a page you pick.
RedirectionAn automatic redirect to the home page or any page you pick.

Since the user is no longer logged in after deletion, pick a public page. The home page is the default.

An optional title

Like the other modules, the settings include an optional custom title with a choice of heading tag, rendered above the button.

Next step

The Settings Page.