cPanel/WHM Utility Scripts (Commands) For cPanel Server Administrator

cPanel is the best and number 1 web hosting control panel for a Linux server.

This will enable the administrator to manage everything through cPanel/WHM without headaches.

It currently supports CentOS/RHEL/CloudLinux 6/7.

cPanel/WHM is designed to instantly host a website after installation.

cPanel installs all the software needed to run a website, including Apache, PHP, MySQL/MariaDB, PostgreSQL, Perl, BIND (DNS), POP3, IMAP, and SMTP services are part of the cPanel installation process.

When you add a domain name through cPanel, it automatically adds all the inputs needed to run a website, such as creating a user account on the server, the home directory for the user, the DNS zone for the domain, adding a domain to Exim mail server, and ftp account for file transfer, if you give information, it also adds a database.

But on normal server this is very difficult and you have to create everything manually.

However if you only host a few websites, you can manage without cPanel, but when you host more than 100 websites it is very difficult to manage that server.

It provides a number of useful command-line utility scripts that enable you to perform multiple actions through CLI.

If you are looking for the location of cPanel/WHM log files, read the following articles and refer to the following articles for the location of the cPanel/WHM configuration files location.

Even if you have a future rich graphical interface (GUI), you may need to do some work on the command line. It provides over 100 application scripts to manage cPanel/WHM through CLI.

Here we are going to list the important cPanel/WhM application scripts. The scripts are located in the /usr/local/cpanel/scripts directory, and you are advised to do the full path when you want to use this script.

To display help for a script, run the command as follows:

/usr/local/cpanel/scripts/[scripts] --help
/scripts/addnsadd a dns zone
/scripts/addpopadd a pop3 email account
/scripts/addservletsAdd JSP support to a domain (tomcat server required)
/scripts/adduserAdd a user to the system
/scripts/buildeximconfRebuilds exim.conf
/scripts/chpasschange cpanel passwords to particular account
/scripts/courierupused to update/reinstall courier
/scripts/cpbackup --forceto backup accounts (if backups enabled on WHM)
/scripts/easyapacherecompile apache
/scripts/editquotato manually set a users quota limit
/scripts/eximupto update exim to latest version - will overwrite any manual changes which was made on exim.conf file
/scripts/fixcommonproblemsfixes mailbox permissions, mailman, cgi scripts, ndc and quotas
/scripts/fixmailmanfixes common mailman issues
/scripts/fixndcfixes rndc errors with named
/scripts/fixquotasfixes quota problems
/scripts/fullhorderesetresets horde database to a fresh one - all previous user data are lost
/scripts/ftpupused to update/install FTP server (pureftpd or proftpd) to latest version
/scripts/generatemaildirsizegenerates new maildirsize for any or all users
/scripts/initquotasinitializes quotas
/scripts/installzendoptinstalls zend optimizer via phpextensionmgr
/scripts/killacctterminate an account - make sure you take a backup of the account first
/scripts/killdnsremoves a DNS Zone
/scripts/mailpermfixes permission problems with mail directories
/scripts/makecpphprebuilds internal PHP from /var/cpanel/easy/apache/profile/makecpphp.profile.yaml
/scripts/mysqlupused to update mysql to latest version specified in /var/cpanel/cpanel.config
/scripts/pkgacctto create an account backup
/scripts/phpupto update PHP only
/scripts/phpextensiomgrInstalls IonCube, Zend Optimizer, SuHosin & eAccelerator
/scripts/rebuildnamedconfrebuilds /etc/named.conf with zones from /var/named/*.db
/scripts/restartsrv_$servicenamerestart script for services
/scripts/restorepkgrestores an account from a backup file (pkgacct file)(must be in /home)
/scripts/runlogsnowupdate logs of all users
/scripts/runweblogsupdate stats for a particular user
/scripts/securetmpsecures /tmp partition with options nosuexec and nosuid
/scripts/suspendacctsuspends an account
/scripts/unsuspendacctunsuspends a suspended account
/scripts/upcp --forceupdates cpanel to the latest version
/scripts/updatenowupdates the cpanel scripts
/scripts/updateuserdomainsupdates /etc/userdomains entries from /var/cpanel/users
/scripts/wwwacctto create new accounts (wwwacct user password)

I hope you found this article helpful. Please provide your valuable feedback in the comment section to improve this article.

Stay tuned with us!!

About Magesh Maruthamuthu

Love to play with all Linux distribution

View all posts by Magesh Maruthamuthu

Leave a Reply

Your email address will not be published. Required fields are marked *