I'm making a front-end user delete button but it only removes the user from the current installation and I need to remove them from the entire multisite network so they are able to sign up again with the same email if they decide. Is there a way to do this?

$userid = get_current_user_id();
wp_delete_user( $userid );
  • Can we see the current implementation? Edit your question and insert the code that does the deletion – Tom J Nowell Sep 22 '18 at 0:18
  • 1
    Yes I just added – Miguel Dey Sep 22 '18 at 0:31

You would want to use wpmu_delete_user:

$userid = get_current_user_id();
wpmu_delete_user( $userid );

Deletes a user from the network and removes it from all sites.


| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.