Keeping your cPanel installation up-to-date is crucial for ensuring the security, performance, and stability of your hosting environment. This support article provides a step-by-step guide on how to update cPanel via the command line.
Prerequisites
Before you begin, ensure you have the following:
SSH access to your server.
Root or sudo privileges.
Steps to Update cPanel
Access Your Server via SSH
Open your preferred SSH client.
Connect to your server using the following command:
sh ssh root@your-server-ip
Replace
your-server-ip
with the IP address of your server.
Check the Current Version of cPanel
To verify the current version of cPanel installed on your server, run:
sh /usr/local/cpanel/cpanel -V
This command will display the current version number.
Update cPanel to the Latest Version
To update cPanel, use the built-in update script provided by cPanel:
sh /scripts/upcp
The update process will begin, and you will see a series of messages indicating the progress of the update. This process may take some time, depending on the speed of your server and the size of the update.
Verify the Update
Once the update process is complete, verify the new version by running
sh /usr/local/cpanel/cpanel -V
Ensure the version number matches the latest cPanel release.
Restart cPanel Services (Optional)
Although the update script usually restarts the necessary services, you can manually restart the cPanel services to ensure everything is running smoothly:
sh /scripts/restartsrv_cpsrvd
Troubleshooting
Update Failed: If the update script fails, review the output for error messages. Common issues include network problems or insufficient disk space. Address these issues and try running the update script again.
Check Logs: For detailed error information, check the cPanel update logs located at
/var/cpanel/updatelogs/
Updating cPanel via the command line is a straightforward process that ensures your server remains secure and up-to-date with the latest features and fixes. Regular updates are recommended to maintain the optimal performance and security of your hosting environment.
For any issues or further assistance, please contact support.
Still need help?
Contact us