A WHM server with 50 cPanel accounts probably hosts somewhere between 30 and 100 WordPress installs. Managing plugins one site at a time becomes impossible quickly. WP Toolkit (when licensed), WP-CLI from a server-side loop, and a small amount of scripting turn “I should update everything” from a day’s work into 20 minutes.
What’s happening
Each cPanel account has its own filesystem and its own WordPress installs. WHM gives the server admin a view over all of them. WP Toolkit, when installed on a cPanel/WHM server, can enumerate every WordPress install across every account, report on plugin versions, and run updates in bulk. WP-CLI on the server can do the same with a shell script. Either way, the principle is: enumerate once, act once.
How to verify
Server-side enumeration of WordPress installs:
for user in $(cut -d: -f1 /etc/passwd | grep -v '^cpanel\|^root\|^nobody'); do
find /home/$user/ -name 'wp-config.php' -maxdepth 4 2>/dev/null | head
done
Or via WP Toolkit (if licensed):
/usr/local/cpanel/scripts/wpt-cli list
That tells you the surface area. The next question is plugin inventory.
The fix
-
Build an inventory. Per WordPress install:
wp --path=/home/user1/public_html plugin list --format=csvFor all installs:
for wp_path in $(find /home -name 'wp-config.php' -maxdepth 4 2>/dev/null); do site_dir=$(dirname "$wp_path") user=$(stat -c %U "$wp_path") sudo -u $user wp --path="$site_dir" plugin list --field=name,version --format=csv doneDump that into a CSV and sort by plugin name. Now you can see “which version of Yoast SEO is each site running” and identify outliers.
-
Bulk updates with WP Toolkit. The interface is point-and-click: WHM > WP Toolkit > Updates. Filter by available updates, select all, hit Update. The Toolkit handles per-site execution and reports per-site results. Combined with Smart Updates (clone-and-test), the failure rate is low.
-
Bulk updates with WP-CLI. The script:
#!/bin/bash for wp_path in $(find /home -name 'wp-config.php' -maxdepth 4 2>/dev/null); do site_dir=$(dirname "$wp_path") user=$(stat -c %U "$wp_path") echo "=== $site_dir ($user) ===" sudo -u $user wp --path="$site_dir" plugin update --all donePipe to a log file. Review failures after.
-
CVE response. When a CVE drops for a specific plugin, the question is “which of my sites is exposed?” The answer is the inventory you built in step 1, filtered to that plugin name:
grep -E "vulnerable-plugin," inventory.csvUpdate only those.
-
Plugin policy. Establish a list of allowed plugins server-wide. Anything not on the list gets flagged in the inventory. Some hosts use WP Toolkit’s “Disallowed plugins” feature to block install of specific plugins network-wide.
-
Site-to-site consistency. If you run a small set of sites that should all have the same plugins, write that as a baseline and compare each site against it weekly. Drift (a site missing a security plugin, or running an old version) is a signal — investigate.
-
WHM-side considerations:
- CageFS isolates each cPanel user. Running WP-CLI from root with
--allow-rootis technically possible but writes files as root, which the cPanel user then can’t modify. Usesudo -u $user wp --path=...instead. - PHP version per account. WP-CLI calls PHP. Each account may have a different PHP version selected. The script above handles this implicitly because
sudo -u $userpicks up the user’s environment, but if yourwpshim doesn’t, you’ll need per-account PHP path detection.
- CageFS isolates each cPanel user. Running WP-CLI from root with
-
For environments where this needs to be a repeatable operation rather than a one-off, Stack Harbor maintains the tooling and runs the updates as part of cPanel server management.
Stack Harbor operates production WordPress at scale — see enterprise WordPress operations for the managed model, or book a WordPress consult for a written read of your current shape.