So you need to disable a user account but not delete it on your WordPress website/Blog? So than while the user’s account is disabled the user should not be able to login.
I believe that disabling accounts should be a core feature in WordPress. Although there are a few bloggers that may not think they need this, every site with more than one user needs it.
Here are my reasons why disabling accounts should be a core feature: Accounts get compromised daily. Accounts should not go unused for long periods of time. Employees leave or change departments.
Disable User Accounts in WordPress
Go to Users then Edit user profile.
Go to users then select the user you wish to disable the account.
Change role to “ – No role for this site – ” to disable a user without deleting them.
Then scroll down and Update User to save settings.
If they try to log in, they will get a message that they do not have permissions to access this page.
Conclusion: The user will be disabled until you re-assign a role.