Today I went to import a large number of posts from a live WordPress site to a local copy of the site. We all know that the WordPress Importer tool hasn’t had much love lately and is slightly broken. PHP will time time out you and drive you crazy if you try to use it.
However, there’s WP-CLI to help. Using WP-CLI, you can easily import your XML/WXR files. But when you do this, you may get this error:
Error: This does not appear to be a WXR file, missing/invalid WXR version number
Don’t worry, this is super easy to fix.
- Open your exported XML file that you are attempting to import.
- Find the line:
- Change it to:
- Import the file.
Problem solved, at least for me.
12 replies on “SOLVED: This does not appear to be a WXR file, missing/invalid WXR version number.”
Thank you! Worked for me on 1/24/21
Thank you.. it did work but I had to unzip the file first, then I was able to change it in a word doc and re-import it… thanks so much!
there is no1.2
line in my xml file. i tried it manually but failed.
You may need to update both WordPress and the import plugin. My original issue was resolved some time ago now.
I tried doing this as well and still get the same error message? I am trying to import a theme demo file that is only available as URL redirect. I copied/pasted info to a word doc then converted to XML to no prevail this method conveyed error message. Could you provide a better option to import a theme demo file?
Didn’t work for me, but for huge files like the 130mb you can zip the xml – usually this gets accepted and makes for a tiny file.
i have tried it and no luck so far . my file is greater than 130mb.
so can you point me in the right direction to solve this issue.
Hi Julius, you will need use a wxr file splitter to break it up into multiple imports.
thank you,, it solved my problem too…
Thanks! It did solve my issue!!!
Hello, I want to import new created excel file into my WordPress site. how can i import ? please help me…
You might be able to find a CSV import option via a plugin. However, an Excel file importer might be harder to find.