Page tree
Skip to end of metadata
Go to start of metadata

For cPanel & WHM version 56


When cPanel & WHM installs, cPanel-provided scripts become available in your server’s /usr/local/cpanel/scripts directory. To run a script, enter its location on the command line. For example, to run the update script, run the following command:



Do not use scripts in the /usr/local/cpanel/scripts directory that we do not list in this document. You may damage your server if you run those unlisted scripts.


addpopAdds a POP account.
build_maxemails_configSets limits on the amount of email that users can send from domains on your server. For more information about this script's limits, read our Mail Limiting Features documentation.

Check user accounts for ~/.my.cnf files that do not work, and disable them. This script only returns output when it detects a bad .my.cnf file.


For more information, run the following command:

/usr/local/cpanel/scripts/check_users_my_cnf --help
chkmydnsPerforms a simple configuration check of MyDNS.

Compare the contents of two CDB files. Specify the two CDB files that you wish to compare after the script.


For example, run the following command, where file1 and file2 represent the two files that you wish to compare:

/usr/local/cpanel/scripts/comparecdb file1 file2

Sets up your IPv6 firewall. Any user with root privileges can run this script. Run this script if either of the following statements are true:

  • You do not manage your IPv6 firewall rules with any other tools or utilities.
  • You cannot connect to your IPv6 addresses or IPv6-enabled websites on port 80.


  • The rules that this script creates remain active even if you reboot the server.
  • Due to the way in which CentOS 7, CloudLinux™ 7, and Red Hat® Enterprise Linux (RHEL) 7 manage firewalls, we do not recommend that you use this script if your server uses one of those operating systems. 

This script performs the following actions:

  • Opens port 22 for SSH.
  • Opens port 53 for DNS.
  • Opens port 80 for HTTP.

Converts the Roundcube database from MySQL® to SQLite.


You may need to convert individual accounts, even after the database conversion. To convert individual cPanel accounts that use Roundcube to SQLite, add the username as the parameter:

/usr/local/cpanel/scripts/convert_roundcube_mysql2sqlite user
copy-etc-filesThis script creates customized copies of your /etc/bashrc, /etc/issue, and /etc/ files in the /etc directory.
cpbackupBacks up all accounts.
delpopRemoves a POP account.
dovecot_auto_expunge_trashThis script runs nightly and deletes messages from trash folders that are older than the Trash Expire Time value in WHM's Mailserver Configuration interface (Home >> Service Configuration >> Mailserver Configuration). To activate this script, select the Auto Expunge Trash checkbox.

Displays the contents of a CDB file. Specify the CDB file that you wish to view.


For example, run the following command, where file represents the file that you wish to view:

/usr/local/cpanel/scripts/dumpcdb file
easyapacheUpgrades and reinstalls Apache.
exportmydnsdbExports zones from MyDNS for use with BIND and NSD.
fixmailinglistpermsRepairs permissions for all mailing list files and directories.
gather-update-logsSends update logs to cPanel, Inc. for analysis.
hookExecutes any hooks that the system would normally call in the specified context.
importmydnsdbImports zone information from BIND and NSD into MyDNS.
installpostgresInstalls PostgreSQL®.
installrubyInstalls Ruby.
install_pluginInstalls a cPanel plugin. For more information, read the Guide to cPanel Plugins documentation.

Performs system updates, and terminates the processes that you specify in WHM's Background Process Killer interface (Home >> System Health >> Background Process Killer).



manage_greylistingManages the cPanel Greylisting service. For more information, read The manage_greylisting Script documentation.
modsec_vendorLists, adds, removes, or updates ModSecurity™ vendors.

Updates the theme for specific accounts on the server.


For more information, read the scripts/modify_accounts documentation or run the following command: 

/usr/local/cpanel/scripts/modify_accounts --help

Updates the theme for specific packages located on the server.


For more information, read the scripts/modify_packages documentation or run the following command: 

/usr/local/cpanel/scripts/modify_packages --help
phpextensionmgrManages PHP extensions.
pkgacctHandles cPanel packages. For more information, read our /scripts/pkgacct — Package a cPanel account documentation.
process_site_templatesThis script processes template files and user-provided data to create an Site Publisher website.
purge_modsec_logRemoves stale records from the modsec database.

A wrapper script that automates the installation of CPAN modules.

rebuild_dbmapRebuilds a user's corrupted database map.
rebuild_phpconfManages your server's default PHP version and PHP handlers in EasyApache 4. For more information, read our The /bin/rebuild_phpconf Script documentation.

Restarts a service. For more information, read our How to Restart Services documentation.

We currently provide restart scripts for the following services (replace the asterisk (*) in restartsrv_* with the desired item below):


Restarts the Apache web server.


Restarts the BIND nameserver software.


Restarts cPanel’s TailWatch log processing service.


Restarts the ClamAV antivirus software.


Restarts the cpanellogd daemon.


Restarts cPanel’s WebDAV server.


Restarts cPHulk.


Binds or rebinds the server's IPv6 addresses. Run this script with the --list flag to list all of the server's bound IPv6 addresses.


Restarts the cpsrvd daemon.


Restarts the crond daemon.


Restarts the dnsadmin daemon.


Restarts the Dovecot mail server.


Restarts the Entropy chat client.


Restarts the Exim mail exchanger.


Restarts the Exim mail statistics tracker.

ftpd or ftpserver

Restarts the configured FTP service (ProFTPd or Pure-FTPd).


Restarts the Apache web server.


Restarts the IMAP server (Dovecot).


Restarts the super-server daemon that manages Internet services.


Restarts the IP address aliasing software.


Restarts Mailman.


Restarts the MyDNS server.


Restarts the MySQL database server.


Restarts the BIND nameserver software.


Restarts the NSD nameserver daemon.


Restarts the passive OS fingerprinting service.

postgres or postgresql

Restarts the PostgreSQL database service.


Restarts the ProFTPd server daemon.


Restarts the Pure-FTPd server daemon.


Restarts the queueprocd daemon.


Restarts the open-source log forwarder daemon.


Restarts the Apache SpamAssassin™ daemon.


Restarts the Secure shell daemon.


Restarts the Log forwarder daemon.


Restarts cPanel’s TailWatch log processing service.


Restarts the Apache Tomcat service.


Restarts the open-source super-server daemon.

removeacctRemoves a cPanel account.
restorepkgRestores a package. For more information, read our Restore Package Script documentation.
rpmupUpdates system software for all users.
runstatsonceUpdates statistics for all users.
runweblogsUpdates statistics for a user.
setup_greylist_dbCreates the greylist SQLite database and allows you to add common email services to the Trusted Hosts list.
setup_modsec_dbCreates the modsec MySQL database and user.
setupftpserverAllows you to switch between FTP servers.

Allows you to switch between mailservers.


We removed the Courier mailserver in cPanel & WHM version 54. cPanel & WHM only ships with the Dovecot mail server.

setupnameserverAllows you to switch between DNS servers.
slurp_exim_mainlogImports exim mainlog data into the eximstats database.
suspendacctSuspends an account.
try-laterExecutes a user-defined check command at a specified interval. If the check command returns an error, it retries as often as the max-retries parameter allows. When the check succeeds, a user-defined action command runs. You can use this script with the following options:


Allows you to specify a delay (in an interval other than minutes) after which to run the check and action commands. If you set this option, then the try-later command will pass directly to the at command. To learn more about the at command, visit its man page.


Runs when the check command succeeds.


Runs the action command when retries are exhausted.


Determines whether the action command will run.


Allows you to specify a delay (in minutes) after which to run the check and action commands. This value defaults to 5. If you set this option, then it overrides the --at option.


Displays a brief help message.


Allows you to specify the maximum number of retry attempts before you run the action command. This value defaults to unlimited.


Skips the initial check command.
uninstall_pluginUninstalls a cPanel plugin. For more information, read our Uninstall Plugins documentation.

Restores a service account to an unlinked state.



unsuspendacctUnsuspends an account.
*upUpdates a service. We currently provide several scripts that use this format to update a service.


Updates the cPAddons scripts.


Updates the current version of PHP.


Updates the suPHP tool to handle PHP requests.
Updates cPanel & WHM.
upcp-runningSpecifies whether a upcp command runs. This information displays in text output and the script's exit value. By default, a zero exit value signals that the target upcp command currently runs.


Displays a brief help message.


Exits with a non-zero error value (1) if the target upcp command currently runs.
wwwacctAdds a cPanel account. For more information, read our The /scripts/wwwacct Script documentation