Plugins Plugin hub Backup SEO Caching Security Forms WooCommerce Images Best backup plugins
Hosting Hosting directory Shared hosting Managed WordPress Cloud hosting VPS hosting By reader location Hosting finder
Themes & builders Compare Rank Math vs Yoast
Tools All tools Hosting finder Plugin stack builder Cost calculator Salt generator Theme detector Who is hosting this? Speed test Headline analyzer robots.txt generator Redirect generator Uptime calculator Blog name generator
Blog Best backup plugins Deals
Guides All guides Speed up WordPress Choose hosting Back up WordPress
How we test

Setup & site building · Guide

How to Import XML Into WordPress (Step by Step)

How to Import XML Into WordPress (Step by Step)

Short answer

Go to Tools, then Import, and install the WordPress importer. Click Run Importer, upload your XML export file, choose how to assign authors and tick the option to download attachments. Click Submit and wait for the success message, then check your posts, pages and media.

Key takeaways

  • The built-in importer reads WordPress export files, known as WXR.
  • Install it from Tools, then Import, and click Run Importer.
  • Images only import if the old site is online and you tick the attachments box.
  • Split large files or use WP-CLI to get around upload limits.
  • Use WP All Import for product feeds and other generic XML.
  • Themes, plugins, widgets and settings are not in the XML file.

What kind of XML file can WordPress import?

WordPress's built-in importer reads WXR files, the XML format WordPress creates under Tools > Export, while other XML files such as product feeds need a plugin like WP All Import.

Before you start, check where your file came from. That decides which tool you need.

  • WordPress export file (WXR): created by Tools > Export on another WordPress site, or by some platforms that export in WordPress format. Use the WordPress Importer.
  • RSS feed file: a blog feed. WordPress has a separate RSS importer.
  • Any other XML: product catalogs, property listings, job feeds or custom data. Use a flexible import plugin.

XML is a plain-text markup format, explained well in this introduction to XML on MDN. A WXR file usually starts with an rss tag and contains lines such as wp:post_type and wp:author. Open it in a text editor to check if you are unsure.

If you still need to create the file, see our guide on how to get a WordPress XML file.

How do you install the WordPress Importer?

Go to Tools > Import, find WordPress in the list and click Install Now; once it installs, the link changes to Run Importer.

WordPress keeps importers as separate plugins so the core stays light. Installing it takes a few seconds.

  1. In your dashboard, go to Tools > Import.
  2. Find WordPress in the list of importers.
  3. Click Install Now.
  4. When it finishes, click Run Importer.

You can also install the WordPress Importer plugin from Plugins > Add New Plugin like any other plugin. Our guide on installing an import plugin in WordPress covers both routes.

The WordPress documentation on the Tools Import screen lists all the official importers.

How do you import the XML file step by step?

Run the importer, choose your XML file, click Upload file and import, assign authors, tick the option to download attachments, then click Submit and wait for the success message.

Here is the full process:

  1. On the importer screen, click Choose File and pick your XML file.
  2. Click Upload file and import.
  3. On the next screen, decide what to do with each author from the old site.
  4. Tick Download and import file attachments if you want images and files copied over.
  5. Click Submit.

Large imports can take several minutes. Keep the browser tab open until you see a message such as All done. Have fun!

Afterward, check Posts, Pages and Media to confirm everything arrived.

How should you assign authors during import?

You can create a new user for each imported author, map them to an existing user on your site, or assign everything to yourself; choose based on whether those people will log in.

The importer shows every author from the file. For each one you have three choices:

ChoiceWhat happensWhen to use it
Import as a new userCreates a user with that login nameAuthors will keep writing on the new site
Assign to an existing userGives their posts to a user you pickThe author already has an account here
Leave both blankPosts go to you, the importing userSingle-author sites or archived content

New users created by the importer get a random password. They will need to reset it with the lost password link before logging in.

If you are merging several sites, mapping authors to existing users avoids duplicate accounts.

Why are images missing after importing XML?

The XML file only holds links to media, so images import only if you tick the attachments option and the old site is still online, reachable and not blocking the new server.

This is the most common surprise. The WXR file lists attachments by URL. The importer then tries to download each file from the old site.

Images fail to import when:

  • The old site is offline or the domain now points to the new site.
  • The old server blocks requests or uses hotlink protection.
  • The download times out on large files.
  • You did not tick Download and import file attachments.

Fixes include:

  • Keep the old site online until the import finishes.
  • Run the import again with attachments ticked. The importer skips posts that already exist, so it mostly adds the missing media.
  • Copy the wp-content/uploads folder by FTP and then regenerate media records with a plugin.

For a complete move including media, a full migration is often easier. Our guide on how to migrate WordPress manually covers copying files and the database.

What if the XML file is too large to upload?

If the file is larger than your upload limit, raise the limit, split the file into smaller parts, or run the import with WP-CLI, which avoids browser upload limits entirely.

The importer screen shows the maximum upload size. It comes from your server's PHP settings.

You have a few options:

  • Raise the limit. See how to increase max upload size in WordPress.
  • Export in smaller parts. On the old site, use Tools > Export to export one post type or a date range at a time.
  • Use WP-CLI. Upload the file by FTP and run the import from the command line.

The WP-CLI command looks like this:

wp import export-file.xml --authors=create

The wp import command documentation lists all options. The command needs the WordPress Importer plugin installed.

If you get an upload error message, our guide on the uploaded file exceeds the upload_max_filesize directive explains the exact fix.

How do you import a non-WordPress XML file?

Use an import plugin such as WP All Import, which lets you upload any XML file and drag its fields onto WordPress titles, content, custom fields, images and taxonomies.

Generic XML files do not follow WordPress's format, so the built-in importer cannot read them. A mapping tool bridges the gap.

The usual workflow is:

  1. Install the import plugin.
  2. Upload or link to the XML file.
  3. Choose what to create: posts, pages, products or a custom post type.
  4. Map XML elements to WordPress fields.
  5. Set rules for updating existing items on later imports.
  6. Run the import.

Start with our guide on how to install WP All Import.

Then follow how to use WP All Import for mapping and scheduling.

For products specifically, see importing WooCommerce products with images.

If you are a developer, you can also parse XML with PHP's SimpleXML extension and create posts with wp_insert_post.

What should you check after the import?

Review posts, pages, menus, categories, media and internal links, fix any broken URLs that still point to the old domain, and reset permalinks so new content loads correctly.

A post-import checklist:

  • Content counts. Compare post and page counts with the old site.
  • Categories and tags. Check they came across with the right names. See how to import categories in WordPress if they did not.
  • Menus. WXR includes menus, but you must assign them to a menu location under Appearance.
  • Links. Internal links may still point to the old domain. A search and replace tool can update them.
  • Permalinks. Go to Settings > Permalinks and click Save Changes to refresh rewrite rules.

Our guide to fixing broken links after migration covers link cleanup in more detail.

What does the importer not bring across?

The WordPress XML file does not include theme files, plugin files, most plugin settings, widgets, or Customizer options, so you need to set those up separately on the new site.

WXR focuses on content. It carries posts, pages, comments, custom fields, categories, tags, menus and custom post types. It does not carry:

  • Themes and their settings.
  • Plugins and their configuration.
  • Widgets and sidebar layouts.
  • User passwords.
  • Site settings such as the site title, time zone and reading settings.

For those, install the same theme and plugins on the new site and copy settings manually, or use a full-site migration plugin. The importer is ideal for moving content between sites, merging blogs or bringing in posts from platforms that export in WordPress format, such as when you migrate from Blogger to WordPress.

Frequently asked questions

Will importing XML create duplicate posts?

The WordPress importer checks whether a post with the same title and date already exists and skips it. That makes it fairly safe to run the import twice, for example to retry missing images. Different titles or dates will still create new posts.

Can I import an XML file from Blogger or another platform?

Only if the file uses the WordPress export format. Some platforms export in their own XML format, which needs a dedicated importer or conversion tool. WordPress lists official importers for several platforms on the Tools, Import screen.

Why does the import stop halfway?

Large files can hit PHP time or memory limits, especially when downloading many attachments. Split the export into smaller files, raise PHP limits with your host, or run the import with WP-CLI. Then run it again; existing posts are skipped.

Does the XML import bring over users' passwords?

No. The export file includes author names and emails but not passwords. Users created during import get random passwords and must use the lost password link to set a new one before they can log in to the new site.

Can I import XML into custom post types?

Yes. If the export contains custom post types and the same post types are registered on the new site, the importer brings them in. Register the post types first by activating the plugin or theme that creates them.

Sources

  1. WordPress Importer WordPress.org
  2. Tools Import Screen WordPress.org
  3. wp import WordPress Developer Resources
  4. SimpleXML PHP Manual

Is your product missing, or something out of date?

Tell us what to add or correct. We read every note and reply when we need a source. A message does not buy a ranking.

About the editors

Written and checked byWPLegible Editorial Team Independent WordPress reviews and guides

Researched from the primary sources listed above and checked against our editorial rules before publishing.