Please upgrade your database: Run “bin/magento setup:upgrade” from the Magento root directory


When you try to run Magento 2 and get the error of upgrade requirement Please upgrade your database: Run “bin/magento setup:upgrade, do not be panic. We will guide you through this obstacle.

Related tutorial: Fix front controller reached 100 router match iterations in Magento

The error will look like:

Please upgrade your database: Run “bin/magento setup:upgrade” from the Magento root directory

The error happens because your old module information already exists in database. Therefore, whenever you run, it gets conflict. As confronting this error, you do not have to reinstall Magento 2. Our solution is removing old module information so that it will successfully be upgraded.  Follow the instruction:

  1. First of all, you have to find the setup_module table name in your database, you can use PHPmyadmin for this.
  2. The next step is to find your module.
  3. Now, delete your old module table data from database. Remember delete only the old module. When you run setup:upgrade , it automatically gets generated.

magento 2 module table in phpmyadmin

  1. Go to your Magento 2 root folder and open the Git Bash. Run the following command from your ssh command interface

run command bin/magento setup:upgrade

also the following command to make sure magento is refreshed

After the command is executed and completes, run Magento 2 and all the problems are fixed.

That comes to the end of the tutorial. If you have further issue with this error in operation or come with another solution for it, we are desperately waiting for your comments.

Rate this post


About Author

Daniel is a Magento developer with 5 years of experience with customizing Magento extensions, Magento templates. He's main author at Magento explorer


  1. Followed your solution and then got this error message

    “Can’t create directory /var/www/html/var/generation/Magento/Framework/App/FrontController/.” reset file permissions as per magento guidelines and now get

    HTTP 500 error

Leave A Reply