Categories
Web Development

SOLVED: This does not appear to be a WXR file, missing/invalid WXR version number.

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.

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.

  1. Open your exported XML file that you are attempting to import.
  2. Find the line:
    <wp:wxr_version>1.2</wp:wxr_version>
  3. Change it to:
    <wp:wxr_version>1.1</wp:wxr_version>
  4. Import the file.

Problem solved, at least for me.

By Tim Bunch

Tim Bunch is a Web Developer from Rockaway Beach, Oregon. As a web standards fanatic, he passionately pursues best practices. He also actively engages people on a wide range of topics in a variety of social media networks. Tim is also an avid Wordpress developer, music maker, coffee drinker, and child raiser. @timbunch

12 replies on “SOLVED: This does not appear to be a WXR file, missing/invalid WXR version number.”

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?

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.

Leave a Reply