How to restart cPanel Services

Sometimes, you may want to restart services (like exim, httpd etc.) on your cPanel webserver.

cPanel recommends for CentOS 7 to use a command like:

systemctl [restart|start|stop|status] service-name.service

Example1. Check the status of the Exim server:

root@web [~]# systemctl status exim.service
* exim.service - Exim is a Mail Transport Agent, which is the program that moves mail from one machine to another.
   Loaded: loaded (/etc/systemd/system/exim.service; enabled; vendor preset: disabled)
   Active: active (running) since Mon 2017-05-01 07:51:39 EDT; 1 months 7 days ago
 Main PID: 12081 (exim)
   CGroup: /system.slice/exim.service
           `-12081 /usr/sbin/exim -bd -q60m -oP /var/spool/exim/exim-daemon.pid

Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.
root@web [~]# 

Example2. Restart the Exim server:

root@web [~]# systemctl restart exim.service
root@web [~]#

Notice that no output will be displayed if everything is fine.

Commonly used cPanel services are:

httpd
exim
pure-ftpd
named
dovecot
cphulkd
sshd
mysql
cpanellogd
crond
cpanel


If you prefer, you can restart common services via WHM:

1. Log into your WHM account

2. Navigate to Restart Services.

whm restart services
WHM Restart Services

3. Click on the service icon you want to restart

4. Click the Yes button when WHM will ask Are you sure you wish to restart this service?

5. You will see a short restart log. Check any error/warning messages.

Waiting for ftpserver to restart.........finished.
pure-ftpd (pure-ftpd (PRIV)) running as root with PID 4062 (process table check method)
pure-authd (/usr/sbin/pure-authd -s /var/run/ftpd.sock -r /usr/local/cpanel/bin/pureauth) running as root with PID 4050 (pidfile check method)
ftpserver started ok

Leave a Reply