How to restart services on a cPanel / WHM server

How to restart services on a cPanel / WHM server

 

Restart services in the WHM interface

  • Unless problems prevent this, you can restart most services in WHM’s Restart Services interface (Home >> Restart Services).

Use the restartsrv script

If a service will not restart from WHM, use the /usr/local/cpanel/scripts/restartsrv service command to attempt to restart the service from the command line. When you run this command, replace service with the correct value for that service, we have included all of the possible services you can restart with this script below with an example

  • /usr/local/cpanel/scripts/restartsrv apache

Free cPanel VPS License

apache Restarts the Apache web server.
bind Restarts the BIND nameserver software.
chkservd Restarts cPanel’s TailWatch log processing service.
clamd Restarts the ClamAV antivirus software.
cpanellogd Restarts the cpanellogd daemon.
cpdavd Restarts cPanel’s WebDAV server.
cphulkd Restarts cPHulk.
cpipv6 Binds or rebinds the server’s IPv6 addresses. Run this script with the --list flag to list all of the server’s bound IPv6 addresses.
cpsrvd Restarts the cpsrvd daemon.
crond Restarts the crond daemon.
dnsadmin Restarts the dnsadmin daemon.
dovecot Restarts the Dovecot mail server.
entropychat Restarts the Entropy chat client.
exim Restarts the Exim mail exchanger.
eximstats Restarts the Exim mail statistics tracker.
ftpd or ftpserver Restarts the configured FTP service (ProFTPd or Pure-FTPd).
httpd Restarts the Apache web server.
imap Restarts the IMAP server (Dovecot).
inetd Restarts the super-server daemon that manages Internet services.
ipaliases Restarts the IP address aliasing software.
mailman Restarts Mailman.
mydns Restarts the MyDNS server.
mysql Restarts the MySQL database server.
named Restarts the BIND nameserver software.
nsd Restarts the NSD nameserver daemon.
p0f Restarts the passive OS fingerprinting service.
postgres or postgresql Restarts the PostgreSQL database service.
proftpd Restarts the ProFTPd server daemon.
pureftpd Restarts the Pure-FTPd server daemon.
queueprocd Restarts the queueprocd daemon.
rsyslogd Restarts the open-source log forwarder daemon.
spamd Restarts the Apache SpamAssassin™ daemon.
sshd Restarts the Secure shell daemon.
syslogd Restarts the Log forwarder daemon.
tailwatchd Restarts cPanel’s TailWatch log processing service.
tomcat Restarts the Apache Tomcat service.
xinetd Restarts the open-source super-server daemon.

cPanel VPS

Direct service restart

If the /usr/local/cpanel/scripts/restartsrv script does not restart the service, you can attempt to restart the service directly.

For servers that run CentOS, CloudLinux™, or Red Hat® Enterprise Linux (RHEL) 5 or 6

  • run the following command, where /etc/rc.d/init.d/service is the path to the service:
/etc/rc.d/init.d/service restart

For servers that run CentOS 7, CloudLinux 7, or RHEL 7

  • run the following command, where service-name is the service that you wish to restart:

systemctl restart service-name.service

NOTE –

If you use IPv6, the service network restart command will remove the IPv6 addresses from the network device. To restart your IPv6 configuration after you run the service network restart command, you must run the appropriate command for your version of cPanel & WHM:

  • For cPanel & WHM version 11.52 and earlier, run the /etc/init.d/cpipv6 restart command after you restart the network service.
  • For cPanel & WHM version 54 and later, run the /scripts/restartsrv_cpipv6 command after you restart the network service.

How was this article?

How to restart services on a cPanel / WHM server
12 5 100%
cPanel VPS Server

cPanel Dedicated Servers VPS Servers

Select Language
We are currently updating our website. Please accept our apologies for any disruption you may see.
+