Back to Community

Troubleshooting Common WordPress Importer Errors: From 'File Not Found' to 'WXR Invalid'

44 threads Sep 16, 2025 PluginWordpress importer

Content

Importing content from an XML file is a core task for many WordPress users, whether they're migrating a site, restoring a backup, or merging content. However, the process can sometimes be fraught with confusing errors that halt the import. Based on common community reports, this guide breaks down the most frequent issues users face with the WordPress Importer and provides practical steps to resolve them.

1. "Sorry, there has been an error. File is empty." or "File could not be found."

This is one of the most common errors. It often occurs not because the file is genuinely missing, but due to server configuration limitations.

  • Why it happens: This is frequently caused by server upload size limits (e.g., the upload_max_filesize and post_max_size directives in PHP), incorrect file permissions, or a server timeout during the upload process.
  • How to fix it:
    • Check your file size. If it's large, try splitting it into smaller parts using a tool like WXR File Splitter.
    • Increase your PHP memory and upload limits. You can often do this by adding code to your wp-config.php file or via your hosting control panel.
    • Ensure the /wp-content/uploads/ directory has the correct write permissions (usually 755 for directories and 644 for files).

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

This error means the importer cannot recognize the structure of your XML file.

  • Why it happens: The file may be corrupt, it might have been exported from a non-WordPress platform (like Blogger), or it could contain malformed XML. Sometimes, extra whitespace or characters before the opening <?xml> tag can cause this.
  • How to fix it:
    • Open the XML file in a plain text editor like Notepad++ or VS Code. Ensure the very first line is <?xml version="1.0" encoding="UTF-8" ?> with no blank lines or spaces before it.
    • Verify the file contains the correct WXR version tag, such as <wp:wxr_version>1.2</wp:wxr_version>.
    • If the file was exported from Blogger, it is not in the correct WXR format for the WordPress Importer. You may need to use a different conversion tool specifically for Blogger-to-WordPress migrations.

3. "Failed to import" Media or Posts / The Import Process Stops or Hangs

The import starts but then fails on specific items, hangs indefinitely, or only partially completes.

  • Why it happens: This can be caused by a lack of server resources (timeouts or memory exhaustion), incompatible PHP modules, or conflicts with other plugins or themes. Specific media types like SVG may fail if they are not supported by your WordPress installation.
  • How to fix it:
    • Increase limits: Raise your PHP max_execution_time and memory_limit.
    • Install PHP-XML: Many users have reported that installing the php-xml module on their server resolves fatal errors and incomplete imports.
    • Conflict test: Disable all other plugins and switch to a default WordPress theme (like Twenty Twenty-Four) before importing. This is the most effective way to rule out conflicts.
    • SVG Files: The WordPress Importer does not natively support SVG files. You will need a dedicated SVG support plugin, and even then, import may fail. Manually uploading SVGs is often more reliable.

4. 404, 400 Bad Request, or 500 Internal Server Errors

These HTTP errors occur during the import process.

  • Why it happens: These are typically server-level errors. A 404 might indicate a problem with mod_rewrite rules or file paths. A 400 Bad Request often points to a corrupted browser cache or a server configuration issue. A 500 error is a generic server fault, often related to the above-mentioned memory or timeout problems.
  • How to fix it:
    • Clear your browser cache and cookies, or try a different browser.
    • Check your site's .htaccess file. Sometimes resetting it to the default WordPress rules can help.
    • Contact your web host. Ask them to check the PHP and server error logs for specific clues around the time the error occurred.

5. Importing to a Multisite Network

Importing into a subsite on a WordPress network installation can present unique challenges.

  • Why it happens: User permissions and network-specific configurations can block the import process. Some users reported the importer skipping content or adding pages to the wrong site within the network.
  • How to fix it:
    • Ensure the user performing the import is an administrator for the specific subsite, not just the network admin.
    • Network-wide, check that the file upload settings for the network allow the import file type.

By methodically working through these common issues—checking file integrity, increasing server resources, disabling conflicts, and verifying server modules—you can overcome most obstacles with the WordPress Importer. If one solution doesn't work, move on to the next. The community has found that persistence and a systematic approach are often the keys to a successful import.

Related Support Threads Support