When cPanel & WHM is installed, a number of predefined scripts become available in your server’s
/usr/local/cpanel/scripts directory. You can use any of the scripts simply by typing its location in a terminal session. For example, if you wanted to run the update script, you would type:
Do not use a script within the
build_maxemails_config— Sets limits on the amount of email that users can send from domains on your server. For more information about configuring limits with this script, see our documentation on Mail Limiting Features.
easyapache— Upgrades and reinstalls Apache.
phpextensionmgr— Manages PHP extensions.
*up— Updates a service. We currently provide the following update scripts for the services noted:
restartsrv_*— Restarts a service. We currently provide restart scripts for the following; simply replace the asterisk (*) in
restartsrv_*with the term in bold:
addpop— Adds a POP account.
delpop— Removes a POP account.
wwwacct— Adds a cPanel account.
killpkg— Removes a package.
restorepkg— Restores a package.
cpbackup— Backs up all accounts.
pkgacct— Handles cPanel packages.
upcp— Updates cPanel and WHM.
setupmailserver— Allows you to switch between mailservers.
setupftpserver— Allows you to switch between FTP servers.
setupnameserver— Allows switching between DNS servers.
realperlinstaller— A wrapper script that automates the installation of Perl CPAN modules.
suspendacct— Suspends an account.
unsuspendacct— Unsuspends an account.
runweblogs— Updates statistics for a user.
runstatsonce— Updates statistics for all users.
makecppphp— Re-installs cPanel’s internal PHP.
portsup— Updates ports (FreeBSD® systems only).
check_users_my_cnf— Check user accounts for
~/.my.cnffiles that do not work and disable them. This script only returns output when it detects a bad
comparecdb— Compare the contents of 2 CDB files. You will need to specify the 2 CDB files you wish to compare after the script.
/usr/local/cpanel/scripts/comparecdb $file1 $file2(where the
$file2represent the 2 files you wish to compare)
dumpcdb— Displays the contents of a CDB file. You will need to specify the CDB file you wish to view.
$filerepresents the file you wish to view)
try-later— Executes a user-defined
checkcommand at a specified interval. If the
checkcommand returns an error, it will be retried later, as often as allowed by the
max-retriesparameter. When the check succeeds, a user-defined
actioncommand runs. This script can be used with the following options:
actioncommand will run.
actioncommands. This value defaults to
5. If set, then this option overrides the
actioncommands. If set, then the
try-latercommand will pass directly to the
atcommand. To learn more about the
atcommand, visit its man page.
actioncommand when retries are exhausted.
actioncommand. This value defaults to infinite.
upcp-running— Specifies whether a
upcpcommand is running. This information displays in text output and the script's exit value. By default, a zero exit value signals that the target
upcpcommand is running.
upcpcommand is running.
chkmydns— Performs a simple configuration check of MyDNS.
exportmydnsdb— Exports zones from MyDNS for use with BIND and NSD.
fixmailinglistperms— Repairs permissions for all mailing list files and directories.
gather-update-logs— Sends update logs to cPanel for analysis.
hook— Executes any hooks that would be called normally in the specified context.
importmydnsdb— Imports zone information from BIND and NSD into MyDNS.
mydnsup— Installs and updates MyDNS packages.
restartsrv_mydns— Restarts script from MyDNS.
slurp_exim_mainlog— Imports exim mainlog data into the eximstats database.
update_php_timezonedb— Updates the timezone database used by PHP.
xfer_horde_sid_resolver.pl— Resolves key collision errors before importing Horde data during an account transfer.
installruby— Installs Ruby.
installpostgres— Installs PostgreSQL.
convert_roundcube_mysql2sqlite — Converts the Roundcube database from MySQL to SQLite.
Individual accounts may still need to be converted, even after the database conversion. To convert individual cPanel accounts which use Roundcube to SQLite, add the username as the parameter:
dovecot_auto_expunge_trash— This script runs nightly and deletes messages from trash folders that are older than the Trash Expire Time value in Home >> Service Configuration >> Mailserver Configuration. To activate this script, select the Auto Expunge Trash checkbox.