Question

Unable to import dummy data xml file into wordpress importer.

Posted July 7, 2014 9.2k views

I have setup wordpress 3.9.1 on ubuntu 32 with nginx.

Whenever I import xml dummy data files, the files uploads till 70% and then starts to reupload and then finally gives up.

I have run the following commands to tackle permission problems

cd /usr/share/nginx/html/

sudo chown www-data:www-data * -R

sudo chown -R www-data:www-data /usr/share/nginx/html/
sudo usermod -a -G www-data myusername
sudo chmod -R g+rw /usr/share/nginx/html/

I am now able to install plugins but the above problem persists.

any help is appreciated

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.

×
5 answers

Are you seeing any output in Nginx’s error logs?

tail /var/log/nginx/error.log

yes i am getting this error

2014/07/07 16:00:02 [error] 6177#0: *157 client intended to send too large body:
  2434798 bytes, client: 120.59.101.247, server: 128.199.148.238, request: "POST /wp-admin/admin.php?import=wordpress&step=1&_wpnonce=1f9719d36b HTTP/1.1", host: "www.lionframes.com", referrer: "http://www.lionframes.com/wp-admin/import.php? import=wordpress"

Judging from the error message, you need to increase upload_max_filesize in your php settings. Run:

nano /etc/php5/fpm/php.ini

And set:

upload_max_filesize = 100M
post_max_size = 100M

You might also need to set it in your Nginx configuration as well. Run:

nano /etc/nginx/nginx.conf

Find and edit the line starting with:

client_max_body_size 100M;

Finally restart both php and Nginx:

sudo service php5-fpm reload
sudo service nginx reload

Thanks Andrews I did that it fixed the problem

I am also facing another problem. My homepage is working fine but all my pages show 404 error ? Can you help me with that ?

Thanks again

my error logs say this

2014/07/07 17:30:34 [error] 6385#0: *453 FastCGI sent in stderr: “PHP message: PHP Warning: Invalid argument supplied for foreac h() in /usr/share/nginx/html/wp-content/themes/brandon/functions/meta-page.php on line 174” while reading response header from up stream, client: 120.59.101.247, server: 128.199.148.238, request: “POST /wp-admin/admin-ajax.php HTTP/1.1”, upstream: “fastcgi:// unix:/var/run/php5-fpm.sock:”, host: “www.lionframes.com”, referrer: “http://www.lionframes.com/wp-admin/nav-menus.php

The theme works fine on a shared hosting.

  • I would try contacting the theme’s developer and letting them know about this error you’re experiencing:

    PHP Warning: Invalid argument supplied for foreac h() in /usr/share/nginx/html/wp-content/themes/brandon/functions/meta-page.php on line 174
    
Submit an Answer