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:
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:
- First of all, you have to find the setup_module table name in your database, you can use PHPmyadmin for this.
- The next step is to find your module.
- Now, delete your old module table data from database. Remember delete only the old module. When you run setup:upgrade , it automatically gets generated.
- Go to your Magento 2 root folder and open the Git Bash. Run the following command from your ssh command interface
1bin/magento setup:upgrade
also the following command to make sure magento is refreshed
1 2 3 | php bin/magento cache:clean php bin/magento indexer:reindex php bin/magento setup:static-content:deploy |
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.
2 Comments
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
You see this error because there was a problem with permission that does not allow to create directory in Var folder of Magento. To fix this run the following command
If the command above does not work, read more document on Magento website here: http://devdocs.magento.com/guides/v2.0/install-gde/trouble/tshoot_var-gen-perms.html and http://devdocs.magento.com/guides/m1x/install/installer-privileges_after.html
Hope this helps