How to restart cPanel/WHM

Ever wanted to restart the cPanel/WHM system? There is no need to restart your operating system. You can restart only the cPanel/WHM system via a simple command.

cpanel logo
cPanel Logo


You need to be logged in as root via SSH. Execute the following command:

# /scripts/restartsrv_cpsrvd
root@web [~]# /scripts/restartsrv_cpsrvd
Waiting for “cpsrvd” to restart gracefully ………………waiting for “cpsrvd” to initialize ………finished.

Service Status
        cpanel (/usr/local/cpanel/cpsrvd --llu=1603523850 --listen=10,11,12,3,4,5,6,7,8,9 --start) is running as root with PID 6426 (systemd+/proc check method).

Startup Log
        Oct 24 03:05:44 web.plothost.com systemd[1]: Starting cPanel services...
        Oct 24 03:05:45 s04.plothost.com restartsrv_cpsrvd[6411]: License is valid and has already updated recently.
        Oct 24 03:05:45 web.plothost.com systemd[1]: Can't open PID file /var/run/cpsrvd.pid (yet?) after start: No such file or directory
        Oct 24 03:05:45 web.plothost.com restartsrv_cpsrvd[6411]: Starting PID 6426: /usr/local/cpanel/libexec/cpsrvd-dormant
        Oct 24 03:05:45 web.plothost.com systemd[1]: Started cPanel services.

cpsrvd restarted successfully.
root@web [~]#

To see the status of the cPanel service, use:

# systemctl status cpanel.service
root@web [~]# systemctl status cpanel.service
* cpanel.service - cPanel services
   Loaded: loaded (/etc/systemd/system/cpanel.service; enabled; vendor preset: disabled)
   Active: active (running) since Sat 2020-10-24 03:05:45 PDT; 10s ago
  Process: 6404 ExecStop=/usr/local/cpanel/scripts/restartsrv_cpsrvd --no-verbose --stop --notconfigured-ok --systemd-service=cpanel (code=exited, status=0/SUCCESS)
  Process: 6411 ExecStart=/usr/local/cpanel/scripts/restartsrv_cpsrvd --no-verbose --notconfigured-ok --systemd-service=cpanel (code=exited, status=0/SUCCESS)
 Main PID: 6426 (cpsrvd (SSL) - )
   CGroup: /system.slice/cpanel.service
           `-6426 cpsrvd (SSL) - dormant mode - accepting connections

Oct 24 03:05:44 web.plothost.com systemd[1]: Starting cPanel services...
Oct 24 03:05:45 web.plothost.com restartsrv_cpsrvd[6411]: License is valid and has already updated recently.
Oct 24 03:05:45 web.plothost.com systemd[1]: Can't open PID file /var/run/cpsrvd.pid (yet?) after start: No such file or directory
Oct 24 03:05:45 web.plothost.com restartsrv_cpsrvd[6411]: Starting PID 6426: /usr/local/cpanel/libexec/cpsrvd-dormant
Oct 24 03:05:45 web.plothost.com systemd[1]: Started cPanel services.
root@web [~]#

If you need any assistance, just contact your host.

Resources:
How to Restart Services

Leave a Reply