Restart cPanel Services

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

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.

Common 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
  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.
Share this post: