Answers.Body: <p>In general there is a risk of having a CMS user deleted when the CRM contact is deleted, since the CMS user can (in theory) be the author of pages, comments etc</p>
  
  <p>Therefore Civicrm does not offer this directly and I think you would need to find/make a customisation/extension or see if there is a tool in WP that you could use that would make it easy to find all WP users that are not connected to a civi contact and then delete them (there are solutions for this with Drupal using Views and VBO, and potentially also Drupal Rules in case any of that provides hints for WP)</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-12-08T21:06:35.670Z
Answers.LastActivityDate: 2019-12-08T21:06:35.670Z
Answers.UserDisplayName: petednz - fuzion
Body: <p>I would like that when an admin deletes a CiviCrm contact it also deletes the wordpress user that is linked. 
  I am using "CiviCRM WordPress Member Sync" so when a contact is created it is added to wordpress but it doesn't delete the wp user when contact is removed. This would be quite precious for me as I know I will later need to delete so many users and I don't want to do it twice, on Civicrm and Wordpress.</p>
  
  <p>Would you have a solution ?</p>
  
  <p>Thanks</p>
  
Tags: <wordpress><contacts><user><delete>
Title: Delete wordpress user when related Civicrm contact is deleted
ThreadText: # Delete wordpress user when related Civicrm contact is deleted
  
  (Asked by: username_0 on 2019-12-08)
  
  I would like that when an admin deletes a CiviCrm contact it also deletes the wordpress user that is linked.
  I am using "CiviCRM WordPress Member Sync" so when a contact is created it is added to wordpress but it doesn't delete the wp user when contact is removed. This would be quite precious for me as I know I will later need to delete so many users and I don't want to do it twice, on Civicrm and Wordpress.
  
  Would you have a solution ?
  
  Thanks
  
  **Tags:** wordpress, contacts, user, delete
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2019-12-08. Score: 3 | Accepted answer
  
  In general there is a risk of having a CMS user deleted when the CRM contact is deleted, since the CMS user can (in theory) be the author of pages, comments etc
  
  Therefore Civicrm does not offer this directly and I think you would need to find/make a customisation/extension or see if there is a tool in WP that you could use that would make it easy to find all WP users that are not connected to a civi contact and then delete them (there are solutions for this with Drupal using Views and VBO, and potentially also Drupal Rules in case any of that provides hints for WP)
  
  
  ---
  
  