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
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
sudo apt-get install php-xml
or specific version of the extension
sudo apt-get install php7.1-xml
and then according to docs in php.net you have to add
extension=dom.so
into the php.ini file.
Please note that this extension should be enabled by default. If it's not enabled look for --disable-dom
option.
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