How to Unsuspend All cPanel Accounts with One Command
If multiple cPanel accounts have been suspended (for example, after a billing system issue or a server migration), you can unsuspend all of them at once using a single SSH command.
The One-Line Command
/bin/ls -A /var/cpanel/users | xargs -n1 /scripts/unsuspendacct
This command lists all cPanel users and pipes each username to the unsuspend script.
How It Works
/bin/ls -A /var/cpanel/users— Lists all cPanel account usernames from the system directory.xargs -n1— Passes each username one at a time to the next command./scripts/unsuspendacct— The cPanel script that unsuspends an individual account.
Unsuspend a Single Account
To unsuspend just one specific account:
/scripts/unsuspendacct username
Check Which Accounts Are Suspended
Before running the bulk unsuspend, you can check which accounts are currently suspended:
whmapi1 listsuspended | grep user
Or check the suspension files:
ls -la /var/cpanel/suspended/
Suspend All Accounts (Reverse)
If you need to suspend all accounts (e.g., for server maintenance):
/bin/ls -A /var/cpanel/users | xargs -n1 /scripts/suspendacct
Important Notes
- You must be logged in as root to run these commands.
- This does not affect the root or system accounts.
- After unsuspending, websites and email services will be immediately restored.
- Check your WHMCS billing system to ensure the suspensions are also cleared on the billing side.