This guide shows you how to restart the cPanel service (cpsrvd) on your server using SSH. Restarting the cPanel service can resolve issues with the cPanel interface or apply configuration changes without rebooting the entire server.

How to do it

  1. Step 1: Connect to your server via SSH

    Use your SSH client (such as PuTTY for Windows or Terminal on macOS and Linux) to connect to your server. You will need the server's IP address, root username, and password or SSH key with root privileges. Enter the following command in your SSH client:

    ssh root@your_server_ip

    Replace your_server_ip with your actual server's IP address.

  2. Step 2: Run the restart command

    Once connected to your server, you will need to execute a specific script to restart the cPanel service. Type or paste the following command into your SSH session and press Enter:

    /scripts/restartsrv_cpsrvd

    This command initiates the restart of the cPanel service (cpsrvd). You may see a brief pause as the system processes the request.

  3. Step 3: Verify the service has restarted

    The command will output status messages indicating that the service is stopping and starting. Once complete, the cPanel service should be running normally. You can verify this by checking the last few lines of the output for a message confirming that cpsrvd has started successfully.

    To ensure that the cPanel service is up and running without any issues, you can also check its status with the following command:

    service cpanel status

    This will provide detailed information about the current state of the cPanel service.

Tips and Additional Information

  • Backup Configuration Files: Before making any changes to your server, it's a good practice to back up important configuration files. This can help you restore the system in case something goes wrong.
  • Check Logs for Errors: If you encounter issues after restarting the cPanel service, check the logs for error messages. You can find the main log file at /usr/local/cpanel/logs/error_log.
  • Schedule Maintenance During Off-Peak Hours: Restarting services during off-peak hours can minimize disruption to your users.
  • Use a Support Ticket if Needed: If you're unsure about any of the steps or encounter persistent issues, don't hesitate to contact our support team for assistance.

By following these detailed instructions, you should be able to successfully restart the cPanel service on your server via SSH. This process can help resolve various interface and configuration-related issues efficiently.