Solving the WordPress Error: Sorry, there has been an error. This does not appear to be a WXR file, missing/invalid WXR version number

My Problem

While performing the migration of my WordPress 3.3.1 blog, I used the “export” and “import” features to move my content. Upon trying to import the .xml file into my new WordPress installation that the export feature on the old installation had created, I hit upon this error:

Sorry, there has been an error.This does not appear to be a WXR file, missing/invalid WXR version number

My Solution

Downgrade to WordPress 3.2.x, perform the importation and then upgrade to the latest version.

Downgrading can take two forms: simply reinstalling WordPress from the ground up using an older version or taking the files of an older version and overwriting all existing 3.3.1 files with the exception of the wp-config.php file. Do not overwrite the wp-config file of the WordPress installation that you are trying to import into.

To find old versions of WordPress, visit the WordPress Release Archive. Make sure not to download one of the beta or release candidate files. Also, be aware if you’re site uses the MU version of WordPress. The files for MU installations are separate from the non-MU files.

Other Solutions

There are other possibilities as to why you cannot import your XML file.

The first is to look in the XML file and, near the top, add the line “<wp:wxr_version>1.1</wp:wxr_version>” (without quotes) just after the language definition declaration. For more information, see this WordPress Support thread.

Another possibility is that PHP safe_mode might be turned on and causing problems. safe_mode being on does not in itself guarantee that it is the cause of this problem, but it could be. You will need to contact your web host and ask if safe_mode is turned on. It is common for shared web hosts to enable it.

One Comment

  1. fontaholic designs

    April 6, 2014 at 7:26 am

    I’ve found that I can get this error from a bad ‘full’ export. if i go back and export pages and posts separately and import again, it all works fine.


Leave a Reply

Your email address will not be published. Required fields are marked *

Follow TheNubbyAdmin!

follow us in feedly

Raw RSS Feed:

Contact Me!

Want to hire me as a consultant? Have a job you think I might be interested in? Drop me a line:

Contact Me!

Subscribe via Email

Your email address is handled by Google FeedBurner and never spammed!

The Nubby Archives

Circle Me on Google+!

Photos from Flickr

Me on StackExchange

The IT Crowd Strava Group