Cloud Service >> Knowledgebase >> cPanel >> How do you restart the cPanel Service on a server via SSH?
submit query

Cut Hosting Costs! Submit Query Today!

How do you restart the cPanel Service on a server via SSH?

cPanel is the web hosting Control Panel that offers an easy-to-use graphical interface that allows managing websites, mail accounts, MySQL databases, and other hosting-related facilities. Nevertheless, to achieve maximum strategy and server hosting management, cPanel is a friendly and effective solution for maximum results. However, it sometimes requires the cPanel service to restart on a specific server. This might be useful for many reasons, such as solving issues, installing updates, or performing poorly.

In this knowledge base article, you will learn how to restart cpanel service via ssh on your server. Let’s get started!

Prerequisites

After making sure that the cPanel service is stopped, what should be done next is the following:

- SSH access to your server: In most systems, you must have SSH access, which involves using an SSH client, e.g. g. If you are on Windows, you probably use PuTTY; if you are on MacOS/Linux Terminal, input your server IP/hostname address and the credentials, including the SSH username and password or key.

- Root or sudo privileges: Before restarting the server's cPanel service, you require root/ sudo permission. If you lack root access, you should talk to the web host or system administrator.

Step 1: Connect to Your Server via SSH

- To install the AMP, follow these steps: SSH into your cloud server.

- Type your server's IP address or hostname in the field.

- Enter your SSH credentials, and it will ask you for your username and password or your SSH key.

- When connected, then you should find a terminal or command line interface.

Step 2: Stop the cPanel Service

Before restarting the cPanel service, you'll need to stop it first. To do this, run the following command:

/scripts/restartsrv_cPanel

This command will stop the cPanel service and all its associated services.

Step 3: Verify the cPanel Service Status

After stopping the cPanel service, you can verify its status by running the following command:

/scripts/restartsrv_cPanel --status

Another one shows the status of the cPanel service and other related services at the moment of the command usage. When the cPanel service is all stopped, you should receive some output to a message showing that the cPanel service is inactive.

Step 4: Start the cPanel Service

After you can confirm that the cPanel service is indeed not running, you can go ahead and try to start it again by executing the below command:

/scripts/restartsrv_cPanel --restart

This command will start the cPanel service and all its associated services.

Step 5: Verify the cPanel Service Status (Again)

After restarting the cPanel service, you can verify its status again by running the same command as in Step 3:

/scripts/restartsrv_cPanel --status

If the cPanel service has been started successfully, you should see an output indicating that the service is running and all its associated services are operational.

Additional Notes

- Monitoring the restart process: Assuming that there are many files, the restart process may take quite some time, depending on the available memory and resources on the server. You can track its progress by opening up a new terminal window and then using the top utility to check CPU and memory usage during the restart cycle.

- Checking logs: This process can encounter various errors, all of which are documented in the cPanel service logs. These are normally stored in the /usr/local/cpanel/logs/folder and contain information on various activities done by the control panel.

- Scheduling restarts: You may occasionally wish to schedule cPanel service restarts at a particular time or at specific intervals. To do this, you can use specific jobs, such as cron jobs, that schedule the execution of the respective scripts in operating systems and hosting environments.

- Updating cPanel: If you restart the cPanel service to apply new updates or upgrades to cPanel, which has been installed on your hosting service, then there could be a few more steps described in the update documentation or guide note given by cPanel or your hosting service.

This knowledge base details how to restart cpanel server through SSH. We hope that by following these steps, you will achieve the right outcome.

Y drained (*.), restarting the cPanel service may significantly mitigate problems and optimize your hosting environment. When it comes to system services, always be extra careful. If you encounter any difficulties or need to do something special, consult your hosting service provider or a system administrator responsible for your server.

Cut Hosting Costs! Submit Query Today!

Grow With Us

Let’s talk about the future, and make it happen!