How to solve this issue? DOM extension enabled in cPanel.

PHP Fatal error: Uncaught Error: Class 'DOMDocument' not found in /home/freshvcf/public_html/test/vendor/magento/framework/Config/Dom.php:449

Magento 2 command is not working properly

enter image description here


2 Answers 2


Run this commands and try again :

sudo apt-get install php7.1-imap
sudo apt-get install php-xml

Install DOM Extension .

apt-get install php7.1-xml

Change PHP version according server PHP version

Your Answer

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

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