Skip to content

Reapplying a WHM package after edits without breaking customer overrides

A bulk reapply propagates new package limits to existing accounts — and silently overwrites any per-account exception you set since the last apply. A careful playbook.

Six months ago you bumped a specific customer’s quota from 25 GB to 80 GB as a one-off accommodation. Today the reseller edits the underlying silver-2024 package to raise the standard quota to 50 GB and clicks “reapply to existing accounts”. The customer’s 80 GB silently drops to 50 GB. The first you hear about it is the failed backup the next morning. Package reapplies are useful precisely because they push changes broadly — but every per-account override is collateral damage unless you plan for it.

What’s happening

When you edit a package and choose to reapply, WHM iterates over every account whose plan= matches the package and rewrites the limits in each /var/cpanel/users/<user> from the package definition. The user file becomes a copy of the package. Any field that diverged from the package — because someone called modifyacct user=acme quota=80000 after the create — gets overwritten with no warning, no log of the prior value, and no way to roll back short of restoring from backup.

How to verify

Before any reapply, snapshot the divergence between package and accounts:

whmapi1 listpkgext pkg=silver-2024
whmapi1 listaccts plan=silver-2024 --output=json | jq -r '.data.acct[] | "\(.user)\t\(.diskquota)\t\(.maxsubdomains)\t\(.maxpop)"'
grep -l '^DISK_BLOCK_LIMIT=' /var/cpanel/users/* | xargs -I {} sh -c 'echo {}; grep -E "^(DISK_BLOCK_LIMIT|MAXPOP|MAXSUB)" {}'
tail -f /usr/local/cpanel/logs/access_log | grep editpkg

Compare the per-account values against the package values. Any divergence is an override — note it, decide whether it survives the reapply.

The fix

  1. Build the override list first. Run the listaccts comparison above and write the diverging values to a CSV: user,field,override_value,package_value. This is your re-application backstop.
  2. Apply package edits without checking the reapply box. New accounts get the new limits; existing accounts stay where they are. This is the safest default.
  3. For accounts you do want to bring to the new baseline, run whmapi1 modifyacct user=acme quota=51200 per account, skipping the rows in your override CSV.
  4. For overrides you want to preserve through future reapplies, document them in the account’s notes field (whmapi1 modifyacct user=acme notes="quota override 80GB approved 2025-11-14 ticket 4421") and add the username to a override group your reapply script reads before touching anything.

The kind of state drift that turns one-off accommodations into operational landmines is exactly what Stack Harbor’s environment management practice tracks across multi-WHM fleets so reapplies are predictable.