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?