1

I've tried many times to upload theme-unit-test-data.xml from http://codex.wordpress.org/Theme_Unit_Test But when I'm trying to upload this file in WordPress Importer it gives me an error saying:

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

I'm using the latest version (4.0) of the WordPress CMS.

Edit: I reinstalled the WordPress importer plugin and downloaded the Theme Unit test XML file multiple times with the same result.

0

It seems your XML file not valid. Try to import another xml and check. If another xml imports then its 100% issue with your XML in which you are getting error.

  • I've tried several others, it didn't help much. – paus Nov 20 '14 at 13:39
  • Did you specified WXR version in your file? Like :<wp:wxr_version>1.1</wp:wxr_version> – Helping Hands Nov 21 '14 at 5:07
  • Yes, it was specified in the origital file: <wp:wxr_version>1.2</wp:wxr_version> – paus Nov 21 '14 at 8:34
  • change permission of your wp-content to 755. Then try. This is last try I think. – Helping Hands Nov 21 '14 at 8:58
  • Also try by changing browser , clear cache of your wordpress site using cache plugin.then try to import. – Helping Hands Nov 21 '14 at 9:07
1

I had the same problem. It turned out that there were some ASCII - control characters in the file (export.xml) which are not accepted by the importer. Some of those characters are only visible in a hex-editor.

I removed those characters with the following terminal command:

tr -d '\000-\010\013\014\016-\037\177' < export.xml > new-export.xml

The tr command shown above removes all control characters except Horizontal Tab, Line Feed and Carriage Return from the file and saves a clean file. The new-export.xml then was successfully accepted by the importer.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.