WordPress Import Tools not working
WordPress Import tools used widely to import website data locally for various purpose, like today i was trying to create local website to check some codes which i like to introduce on website, But I thought why not create in locally and check before go to production website. During so i found WordPress Import Tool not working.
I was using CentOS7 machine for this local wordpress.
[root@srvwp ~]# cat /etc/redhat-release CentOS Linux release 7.4.1708 (Core) [root@srvwp ~]# uname -r 3.10.0-693.11.1.el7.x86_64
While importing data from production website, local website successfully upload xml file but further not importing any data over same. I waited for some time but still no incoming traffic on local machine downloading data. Then I search for error in logs.
While searching logs i found one error entry in apache error logs (/var/log/httpd/error_log), as mentioned in below logs
Class 'DOMDocument' not found in /var/www/html/wp-content/plugins/wordpress-importer/parsers.php on line 61
while reading PHP code for exact issue, I analyze that this need php-xml packages which were not installed on my local machine.
So I install php-install package.
[root@srvwp ~]# yum install php-xml -y [root@srvwp ~]# rpm -q php-xml php-xml-5.4.16-43.el7_4.x86_64
With above command. I installed php-xml package and tried to import again. This time it is successfully import all data from production wordpress website towards local website.