How do I enable the DOM extension in the php.ini

Viewed 36128

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

2 Answers

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
Related