List of SSH Commands for cPanel Functions | Tutorial Freak – Online Tutorials

List of SSH Commands for cPanel Functions

Today, I will be listing out few important commands to run some of the basic and important cPanel functions like updating cPanel Software, backing up cPanel through SSH.

Note – The list is too long, if you are searching for any particular command, please use Ctrl+F and find what you are looking for. :)

  • Restart chkservd

    /etc/init.d/chkservd restart

  • Tail Apache log:

    tail -f /usr/local/apache/logs/error_log

  • Updates the cpanel server software:


  • Reinstalls exim:


  • View traffic or if you think a site is being DDoS:

    cd /usr/local/apache/domlogs
    tail -f

  • Correct bandwidth issues:


  • To fix problem in webalizer that stop updating stats:


  • Fix everything:


  • Fixing Mail List MailMan:


  • Reinstall MailMan:



    pico /etc/my.cnf

  • Edit php.ini (may be in a differant place if you have Zend installed, so give the correct path)

    pico /usr/local/lib/php.ini

  • Edit Apache Conf:

    pico /etc/httpd/conf/httpd.conf

  • Checking Real Time Top Processes Login to SSH and run:


  • Run cpanel backup:


  • To try and fix domain controller:


  • Quotas:

    /scripts/initquotas - takes a while to run
    /scripts/fixquotas - takes a while to run

  • Add a DNS (Domain Name Server) Entry:


  • Install Frontpage Mail Exts:


  • Add JavaServlets to an account (jsp plugin pre-required):


  • Add a User:


  • Run WHM Lite:


  • Add Rlimits (cpu and mem limits) to apache:


  • Resync with a master DNS Server:


  • Edit A User’s Quota:


  • Search For Trojans in /dev:


  • Locate Trojan Horses:


  • Suggest Usage:

    /scripts/findtrojans > /var/log/trojans

    /scripts/fixtrojans /var/log/trojans

  • Make Interchange work with suexec:


  • Fix Most Problems with Interchange:


  • Run on a trojans horse file created by findtrojans to remove them:


  • Run this if a user’s stats stop working:


  • Fix a broken valias file:


  • Turn on DMA and 32bit IDE hard drive access (once per boot):


  • Re-scan quotas. Usually fixes Disk space display problems:


  • Turn on SUEXEC (probably a bad idea):


  • Display Ipusage Report:


  • Terminate an Account:


  • Delete “Security Problem Infested RPMS”:


  • Fix Various Mail Permission Problems:


  • Attempt to Troubleshoot a Mail Problem:


  • Change a MySQL Password:


  • Kill Potential Security Problem Services:


  • Rebuild Ip Address Pool:


  • Delete Nasty SSL entry in apache default httpd.conf :


  • Restart a Service (valid services: httpd,proftpd,exim,sshd,cppop,bind,mysql)

    /scripts/restartsrv?? (example: /scripts/restartsrv httpd)

  • Syncup Security Updates from RedHat/Mandrake:


  • Force a webalizer/analog update:


  • Remove non-important suid binaries:


  • Install Frontpage 4+ on an account:


  • Return a Simple process list. Useful for finding where cgi scripts are running from:


  • Suspend an account:


  • Syncup Cpanel RPM Updates:


  • Unblock an IP:


  • UnSuspend an account:


  • Update /scripts:


  • Create a New Account:


  • Awstats to run manually:

    /scripts/runweblogs account_username

  • License Not working:

    rdate -s

  • Kill the MySQL Server

    /etc/rc.d/init.d/mysql stop

  • Repair all SQL databases:

    myisamchk -r /var/lib/mysql/*/*.MYI

  • Start MySQL again:

    /etc/rc.d/init.d/mysql start

  • Restarting cPanel:

    /etc/rc.d/init.d/cpanel restart

  • To run your clients stats now:


  • Restart the background proccess that runs the stats for your clients:


  • To run your clients stats now:


  • To run one clients stats:

    /scripts/runweblogsnow username

  • Shut down http:

    httpd stop

  • Start http with SSL:

    httpd startssl

  • Start http:

    httpd start

Phew! This indeed is a long list of SSH Commands for cPanel Hope this was helpful for you.

Kindly let me know if some command is incorrect/updated twice.

Author, Blogger, SEO Expert, Working Professional and a Student! I play so many roles in life and love what i do. I enjoy each moment of my life. Do follow us on Facebook

Sagar – who has written posts on Tutorial Freak – Online Tutorials.

Help keep us alive & kicking, we need coffee 24/7, please donate, thanks!

Leave a Reply