How do I enable the DOM extension in my php.ini file? I am running a WordPress site and getting a message “Please enable the DOM extension in your PHP configuration”.
Do I need to edit the wp-config file or php.ini
You need to install php-xml
and then add
extension=dom.so
to the php.ini file.
Please note that the extension is enabled by default. It might be disabled because of the following option: –disable-dom
Answer:
You need to install php-xml.
sudo apt-get install php-xml
Restart your server (here apache).
sudo service apache2 restart
And you can check that everything is OK using :
php -m
Resulting :
[PHP Modules]
...
dom < and other relatives modules as xml, xmlreader, SimpleXML...
...
[Zend Modules]
Zend OPcache