How to upgrade cPanel to Latest Version – Force cPanel update upcp

How to upgrade cPanel to Latest Version – Force cPanel update


 

You must have server root access to upgrade cPanel to latest version, without root password it is not possible to upgrade cPanel. You can update cPanel/WHM either through WHM or from server backend (SSH) by executing the cPanel script. Updating cPanel to latest version will fix most of the issues on the server and also it will fix all vulnerabilities in the old version of cPanel. cPanel users will report all bugs in their forum and cPanel developers will fix those issues in the next release. cPanel sets a cron in the crontab file to check for upgrade after midnight.
 
Type the command “crontab -l” to check at what time upcp is scheduled on your cPanel Server.

[root@server ~]# crontab -l | grep upcp
48 2 * * * /usr/local/cpanel/scripts/upcp –cron
[root@server ~]#

cPanel update is scheduled at 2:48 AM on the above server. You can reschedule the cron during off peak hours so that it wont slow the websites on the server. Do NOT remove the cron because latest security updates will not be downloaded from cPanel.
 
cPanel update configuration file is /etc/cpupdate.conf and the content is pasted below.
 

cat /etc/cpupdate.conf
CPANEL=release
RPMUP=daily
SARULESUP=daily
STAGING_DIR=/usr/local/cpanel
UPDATES=daily

 

CPANEL=release = Means release tier is set on the cPanel Server.
RPMUP=daily = Update Operating System Package daily
SARULESUP=daily = Update spamassassin rules daily
UPDATES=daily = Run cPanel updates everyday
 
You can choose whether to upgrade cPanel to “EDGE, CURRENT, RELEASE, or STABLE” tier. cPanel recommend setting ‘RELEASE’ tier in the cPanel update configuration. By default “RELEASE” is set in all cPanel servers after installation.

Make sure there is 3GB of free disk space available on the server before running upcp. cPanel update will fail if the free space available in /usr partition is less than 3GB.

You can set a different staging directory (STAGING_DIR) if there is no enough space in /usr partition to store upcp temporary files.
 


 

Steps to upgrade cPanel to latest version from command line

1. Log into your cPanel server via SSH as root

2. Create a screen using command ‘screen -S update’

3. Run the command ‘/scripts/upcp –force’ in screen to start cPanel update

cPanel update should always be done in screen window because sites will be inaccessible if cPanel installation is interrupted. You can start cpanel update in screen and check the status of update by reattaching the screen. The cPanel update won’t get disconnected due to power failure if you have started the update in screen.

It might take 20 minutes – 1 hour to update cPanel to latest version and might take longer if your server is slow. Update will take only less than 30 minutes if you have a powerful CPU and fast internet connection.

Command to upgrade cPanel to latest version :

/scripts/upcp

OR

/usr/local/cpanel/scripts/upcp
 

root@server [~]# screen -S update

root@server [~]# /scripts/upcp

 
You will see the below if the update is completed successfully without any errors. cPanel updated might fail if there is any package conflict or low disk space on the server.
 

100% complete
[2017-02-05 02:51:03 +0000] cPanel update completed
[2017-02-05 02:51:03 +0000] A log of this update is available at /var/cpanel/updatelogs/update.1486262881.log

 

Detach from screen and tail the above log to see the current status of cPanel update

tail -f /var/cpanel/updatelogs/update.1486262881.log

Do not stop or kill the cPanel update process once you have started it. Stopping upcp process will result in issues on the server/WHM and the websites will not load.

You can use “–force” option to forcefully update cPanel even if it is already up-to-date. Forcefully updating upcp will fix most of the errors in WHM so it is a very helpful and commonly used command by server administrators.

Run the below command to forcefully update cPanel on the server

/scripts/upcp –force

OR

/usr/local/cpanel/scripts/upcp –force

Check cPanel update logs directory to make sure there were no errors while running upcp. cPanel update logs (Upcp logs) are saved in /var/cpanel/updatelogs directory.

You can also run cPanel upgrade from WHM. Follow the below steps to update WHM :

Steps to update cPanel through WHM

 


 
1. Login to WHM as root user

2. Search for ‘Upgrade to Latest Version’ in WHM search bar

3. Click on ‘Upgrade to Latest Version’ under ‘cPanel’

4. Click on ‘Click to Upgrade’ to upgrade cPanel

Home >> cPanel >> Upgrade to Latest Version

Tick “Force a reinstall even if the system is up to date” this is same as command /scripts/upcp –force
 

Upgrade cPanel

Upgrade cPanel


 
cPanel Upgrade WHM

cPanel Upgrade WHM


 
cPanel upgrade going on

cPanel upgrade going on

Do NOT run upcp if your server is experiencing high server load because cPanel might download latest updates and it will further slow down the server.