I have installed fresh magento 2 in my local server. Now when i am trying to reindex from my terminal in Ubuntu its givng error i.e.:

PHP Fatal error: Uncaught Error: Class 'DOMDocument' not found

Prior i have installed magento 2, but it was working fine.

enter image description here

  • check your layout xml , there can be mismatch opening and closing tag. Jun 12, 2017 at 6:48

1 Answer 1


I think your php DOM extension missing please check whether the extension is enabled and listed using the command php -m.

Check the below URL's for needed php extensions for magento2



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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