While updating Magento 2.2.8 to 2.3.1

I'm facing issue when running bin/magento setup:upgrade

I get error:

The XML in file "/var/www/html/vendor/magento/module-store/etc/db_schema.xml" is invalid:
Element 'schema': No matching global declaration available for the validation root.
Line: 9

Anyone was facing this kind of issues?

  • Same problem here, though the file magento/framework/Setup/Declaration/Schema/etc/schema.xsd is present in vendors. Cache cleaned as well. – Matthieu Cardin May 1 '19 at 13:54
  • This does not really answer the question. If you have a different question, you can ask it by clicking Ask Question. You can also add a bounty to draw more attention to this question once you have enough reputation. - From Review – Manashvi Birla May 1 '19 at 14:13
  • None of these fixes worked for me. I upgraded from 2.1.7 to 2.3.1. I have cleared cache. The xsd file exists. Any other ideas anyone? – govindb Jun 12 '19 at 13:16

Check if any of your custom module has overridden any xsd file or SchemaLocator class. Comment that override and run the setup:upgrade again.

We got the same issue and found that our custom module had a plugin on below class: Magento\Framework\Config\SchemaLocator. We commented this plugin in di.xml file and the issue is fixed.

| improve this answer | |

It looks to me that the schema.xsd file that controls the URN schema validation for the new db_schema.xml files is either missing or you have not cleared the cache.

First, try removing all folders and files inside the var/cache folder and run the bin/magento setup:upgrade command again. It that doesn’t solve the issue, check that you have correctly upgraded all Magento files by checking if the following file is present in your installation:


If that file is missing, you will have to try upgrading again your Magento installations. If you are using the downloaded zip package, just copy again the files and be sure to replace the existing files in your installation by the new ones. If you are using composer, follow these instructions: https://devdocs.magento.com/guides/v2.3/comp-mgr/cli/cli-upgrade.html

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.