I have a dump of old site content from three years ago which I now need to get back up on my new site.

At the time, I was told this was a "WP XML" backup, which I took to mean the kind of thing you get from WordPress' Export option.

Indeed, the top of the file states:

<?xml version="1.0" encoding="UTF-8" ?>
<!-- This is a WordPress eXtended RSS file generated by WordPress as an export of your site. -->
<!-- It contains information about your site's posts, pages, comments, categories, and other content. -->
<!-- You may use this file to transfer that content from one site to another. -->

I know these files are intended to be imported using the WordPress Import tool. But there are two possible quirks...

Actually, what I have is a .zip file containing a sequence of eight such .xml files, each named oldsitename.wordpress.2015-03-10.post_type-post.author-23601.001.xml, up to 008. All together, I think they comprise the backup, though different parts of it.


The file totals 15.1Mb, which is larger than the apparent 1Mb file size limit for import. When I attempt to import the .zip file, WordPress reports:

Sorry, there has been an error. File is empty. Please upload something more substantial. This error could also be caused by uploads being disabled in your php.ini or by post_max_size being defined as smaller than upload_max_filesize in php.ini.

My php.ini doesn't refer to any of those things, though I don't know if there is a php.ini at the host provider level which may contain them and which is overriding mine.


Uploading the smallest of the eight .xml pieces (8.3Mb, and an actual .xml file, not a .zip) does not work either. WordPress reports:

Sorry, there has been an error. The uploaded file exceeds the upload_max_filesize directive in php.ini.

That is at least more clear than the feedback for the complete .zip. But it's also strange that php.ini doesn't seem to contain these attributes.


When I paste the following...

@ini_set( 'upload_max_size' , '50M' );
@ini_set( 'post_max_size', '50M');

... in to my functions.php, both methods above still do not work.

What am I going to do?

WP-CLI seems like an option, though not an appealing one..

Even if an .xml file can be made to work where a .zip file will not, will the importer properly recognise and join up the content of eight such files? Would I need to copy and paste them all together?

  • You'll need to talk to your host about increasing the upload limit. That's where it will have been originally set, and hosts are able to prevent users from increasing it through a local php.ini. When you have done that you should be able to import the xml files. Whether you need to import them individually or paste them together somehow depends on exactly what they contain, but I doubt it's one file that's been split up. Try the upload limit thing and then import the files first. – Jacob Peattie Jul 5 '18 at 15:23
  • Set up a proper local testing environment, and see if it imports there, where you full control over it. – mayersdesign Jul 5 '18 at 15:29
  • "talk to your host" worked. They used php.ini to tot it up to 128Mb, whilst acknowledging that, whilst I had done similar, the change had not taken effect. – Robert Andrews Jul 6 '18 at 7:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.