Question

how to install XMLWriter PHP modules

Posted October 3, 2016 48.5k views
WordPress

when i installed wp all import plugin, it gave me this error:
“ Required PHP components are missing.

WP All Import requires DOMDocument, XMLReader, and XMLWriter PHP modules to be installed.
These are standard features of PHP, and are necessary for WP All Import to read the files you are trying to import.
Please contact your web hosting provider and ask them to install and activate the DOMDocument, XMLReader, and XMLWriter PHP modules.”

how can i solve this?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
4 answers

This is not working…

I followed the steps
sudo apt-get update
sudo apt-get install php5-xml

still got error

root@mint:~# sudo apt-get install php5-xml
Reading package lists… Done
Building dependency tree

Reading state information… Done
E: Unable to locate package php5-xml

apt-get install php-xml

These modules are packaged separately by Ubuntu (assuming that you are using Ubuntu).

The following should resolve the problem:

Ubuntu 14.04

sudo apt-get update 
sudo apt-get install php5-xml

Ubuntu 16.04

sudo apt-get update 
sudo apt-get install php7.0-xml

Hello, all

In order to install XMLWriter on Ubuntu use:

sudo apt-get install php-xml

and then restart your web server (Apache/Nginx)

If you want to install it for specific PHP version you can use this command:

sudo apt-get install php7.3-xml

and then again restart your web server.

For CentOS:

yum install libxml2

yum install php-xmlwriter

yum install php-xml

Once this is done you’ll need to restart the web server.

You can also check with a phpinfo file if the extension is enabled or use the following command in your terminal:

php -i | grep xmlwriter

The output should be:

root@digitalocean:~# php -i | grep xmlwriter
/etc/php/7.2/cli/conf.d/20-xmlwriter.ini,
xmlwriter

Hope that this helps!
Regards,
Alex

Submit an Answer