How to Update cPanel to a Specific Version: A Step-by-Step Guide


How to Update cPanel to a Specific Version: A Step-by-Step Guide

cPanel is one of the most popular control panels for web hosting, offering a user-friendly interface for managing servers and websites. However, there may be times when you want to update cPanel to a specific version, such as 124.0.17, rather than the latest stable version. In this blog post, we will guide you through the steps required to set your cPanel to the desired version, ensuring your server stays up-to-date with all the necessary features and security patches.

Why Update cPanel to a Specific Version?

Sometimes, you may have specific compatibility requirements or need to maintain consistency across multiple servers. Updating to a particular version ensures that all features and configurations are as expected, especially in production environments.

Prerequisites

Before we begin, ensure that:

  • You have root access to your server.
  • You understand the importance of backups before performing updates.

Step 1: Check the Current Version of cPanel

Start by checking the current version of cPanel installed on your server:

cat /usr/local/cpanel/version

This will show you the version of cPanel that’s currently running.

Step 2: Modify the cpupdate.conf File

To update cPanel to the specific version 124.0.17, you need to modify the cpupdate.conf file. This file contains settings that determine the update behavior of cPanel.

Edit the file by running:

nano /etc/cpupdate.conf

Inside the file, ensure the following configuration is set:

CPANEL=release
RPMUP=automatic
SARULESUP=automatic
STAGING_DIR=/usr/local/cpanel
  • CPANEL=release ensures that you are using the correct update tier.
  • RPMUP=automatic enables automatic updates for RPM packages.
  • SARULESUP=automatic enables automatic updates for security rules.

Once you’ve made the changes, save the file and exit (Ctrl+O to save, Ctrl+X to exit).

Step 3: Force an Update to Version 124.0.17

Now that the configuration is updated, you can force cPanel to update to the desired version. Run the following command:

/usr/local/cpanel/scripts/upcp --force --target 124.0.17

This will instruct cPanel to fetch and install version 124.0.17 specifically.

Step 4: Verify the Update

Once the update process is complete, check the version again to confirm that the update was successful:

cat /usr/local/cpanel/version

It should now show 124.0.17 as the installed version.

Step 5: Troubleshooting

If the update doesn’t go as planned, here are some steps to troubleshoot:

  • Check if the version is available: cPanel supports a few update tiers such as Stable, Release, and Current. Make sure that 124.0.17 is available in the selected tier. You can adjust the tier by modifying the cpupdate.conf file: sed -i 's/^CPANEL=.*/CPANEL=release/' /etc/cpupdate.conf
  • Check update logs: If errors occur during the update, inspect the logs for more detailed information: less /var/cpanel/updatelogs/latest

Conclusion

Updating cPanel to a specific version, like 124.0.17, is a straightforward process. By modifying the cpupdate.conf file and forcing the update with the right command, you can ensure your cPanel installation is up to date while maintaining compatibility with your environment. Always remember to back up your system before performing any updates, and check the logs for any issues during the process.

If you encounter any persistent issues or need assistance with a specific cPanel version, don’t hesitate to reach out to cPanel support for guidance.