Skip to content
Home » How to Upgrade SonarQube from its previous version to new version.

How to Upgrade SonarQube from its previous version to new version.


In this post we will see how SonarQube can be upgraded to the newer version, for example, upgrading SonarQube 5.2 to SonarQube 5.4.

NOTE: Read upgrade notes from below link for each version upgrade to see if there are any extra steps to be taken care of.

Now below are the steps to be followed for upgrade:

1. Stop existing SonarQube server:
Stop your existing SonarQube so as to avoid upgrade failure issue. cd to your sonar installation path and run command to stop sonar like
cd /usr/local/Cellar/sonar/5.2/libexec/bin/macosx-universal-64
sudo sh stop

2. Download new SonarQube distribution:

  • Start new SonarQube.
    cd /usr/local/Cellar/sonar/5.4/libexec/bin/macosx-universal-64
    sudo sh start
  • Go to the update center to install required plugins you need and manually install any custom plugins you have.

3. Stop new SonarQube and update few things:

  • Stop new SonarQube server that you started from step 2 above.
    cd /usr/local/Cellar/sonar/5.4/libexec/bin/macosx-universal-64
    sudo sh stop
  • Update the content of the and wrapper.conf files in the conf directory of new SonarQube with the content of the related files in the conf directory from old SonarQube (web server URL, database settings, etc.).
    do not replace the file.
    New sonar conf directory path would be like: /usr/local/Cellar/sonar/5.4/conf
    Old sonar conf directory path would be like: /usr/local/Cellar/sonar/5.2/libexec/conf
  • Take a backup of your sonar database.
  • Now start new SonarQube server again.
    cd /usr/local/Cellar/sonar/5.4/libexec/bin/macosx-universal-64
    sudo sh start
  • browse http://localhost:9000/ setup which will then ask you to upgrade database and once upgrade button is clicked, in few minutes it will be updated and SonarQube will be up and running successfully so that you can access dashboard from http://localhost:9000.
  • Now you can Analyse your Projects again to get fresh sonar analysis.

Hope it helps you to upgrade your SonarQube with latest versions.

Leave a Reply

Your email address will not be published. Required fields are marked *