WordPress Export and Import: Moving Posts and Pages with the Built-in Tools (XML)

Affiliate disclosure v3.1
Affiliate disclosure v3.2 (mobile)
Test environment RHEL familyAlmaLinux 9.8WordPress 7.1.3PHP 8.3WordPress Importer 0.9.6Checked 2026-10-19

With the WordPress export feature, you can download posts, pages, comments, custom fields and categories as a single XML file in WXR format from the Tools › Export menu in the admin screen. On a WordPress 7.1.3 site, I exported a test post, deleted it and uploaded the file again with the importer: the test post came back with the same post ID, together with its comments, categories and custom fields.

1️⃣ The WordPress export screen: what to export and the filters

You set the scope of the content to move on the [Tools] › [Export] screen, and the choices are [All content], [Posts], [Pages] and [Media]. Pick one and click [Download Export File], and the XML file is saved to your computer right away. Post types created by plugins also appear in this list.

Choosing [Posts] opens filters for category, author, date range and status; [Pages] lets you choose author, date range and status, and [Media] only the date range. The date list shows only the months that have posts.

WordPress export screen: Posts selected · Category · Author · Start date · End date · Status filters · Download Export File
The [Export] screen with [Posts] selected

[All content] adds two things that the [Posts] and [Pages] files do not have: the navigation menus and the site-wide style settings (global styles). On a site with 8 posts, 3 pages and 6 comments, the [All content] file was about 64KB, larger than the [Posts] (about 49KB) and [Pages] (about 14KB) files combined.

If you export with [Status: All], the file includes not only published posts but also drafts and posts in the trash; in my test, 1 of the 8 exported posts was a trashed post. To move only published posts, set the status to [Published].

WordPress export and import simulator
wp-adminSimulator
Choose what to export, try the button, then use NEXT ▶ to move on to the import screens.
Tools › ExportTools › ImportTools › Import › WordPressTools › Import › WordPress › Assign Authors
Export

When you click the button below WordPress will create an XML file for you to save to your computer.

This format, which is called WordPress eXtended RSS or WXR, will contain your posts, pages, comments, custom fields, categories, and tags.

Once you’ve saved the download file, you can use the Import function in another WordPress installation to import the content from this site.

Choose what to export

This will contain all of your posts, pages, comments, custom fields, terms, navigation menus, and custom posts.

Category:
Author:
Date range:Start date:End date:
Status:
Author:
Date range:Start date:End date:
Status:
Date range:Start date:End date:
Click
mysite.WordPress.2026-10-19.xml
Import

If you have posts or comments in another system, WordPress can import those into this site. To get started, choose a system to import from below:

Movable Type and TypePad
Install Now | Details
Import posts and comments from a Movable Type or TypePad blog.
RSS
Install Now | Details
Import posts from an RSS feed.
Tumblr
Install Now | Details
Import posts & media from Tumblr using their API.
WordPress Click Click
| Details
Import posts, pages, comments, custom fields, categories, and tags from a WordPress export file.
LiveJournal
Install Now | Details
Import posts from LiveJournal using their API.
Blogger
Install Now | Details
Import posts, comments, and users from a Blogger blog.
Categories and Tags Converter
Install Now | Details
Convert existing categories to tags or tags to categories, selectively.

If the importer you need is not listed, search the plugin directory to see if an importer is available.

Import WordPress

Howdy! Upload your WordPress eXtended RSS (WXR) file and we’ll import the posts, pages, comments, custom fields, categories, and tags into this site.

Choose a WXR (.xml) file to upload, then click Upload file and import.

Choose a file from your computer: (Maximum size: 2 GB) Click No file chosenmysite.WordPress.2026-10-19.xml

Click
Import WordPress
Assign Authors

To make it simpler for you to edit and save the imported content, you may want to reassign the author of the imported item to an existing user of this site, such as your primary administrator account.

If a new user is created by WordPress, a new password will be randomly generated and the new user’s role will be set as subscriber. Manually changing the new user’s details will be necessary.

1. Import author: admin (admin)

or create new user with login name:
or assign posts to an existing user:
Import Attachments
Content Options
Click
Import WordPress

Post “Export test post” already exists.

All done. Have fun!

Remember to update the passwords and roles of imported users.

2️⃣ What goes into the export file: WXR and media URLs

The downloaded file is named in the form [sitename.WordPress.date.xml], and it contains posts, pages, comments, custom fields, categories, tags and author information in WXR 1.2 format.

The export file does not include themes, plugins, values from the settings screens or user passwords, so it cannot serve as a site backup. Media items are not included as files either, only as a single [wp:attachment_url] address line.

3️⃣ WordPress import: installing WordPress Importer and uploading the file

The site that receives the exported file needs an importer installed separately. [Tools] › [Import] lists [WordPress] alongside importers for moving from other systems, such as Blogger, Tumblr and RSS, and at first all of them only show an [Install Now] link.

To import the export file, click [Install Now] in the [WordPress] row to install the WordPress Importer plugin. If the link stops at [Installing…], reload the screen.

Import screen: Tools › Import · list of importers · Install Now in the WordPress row
The [Tools] › [Import] list before installation

Clicking [Run Importer] activates the plugin and opens the [Import WordPress] screen. Choose the export file with [Choose File] and click [Upload file and import]; the size you can upload is shown in [Maximum size] on the same line.

WordPress import screen: Choose File · Maximum size 2 GB · Upload file and import
The file upload field on the [Import WordPress] screen

This limit follows PHP's upload settings (upload_max_filesize · post_max_size); on a server where both values were 2048M, it showed as [Maximum size: 2 GB].

4️⃣ Author assignment and attachments: the import options

After you upload the file, a screen with three sections opens: [Assign Authors], [Import Attachments] and [Content Options]. For each author you either create a new user or assign the posts to an existing user of the receiving site; a newly created user gets a random password and the role Subscriber.

Assign Authors screen: Tools › Import · Import author · create new user · assign to existing user · Import Attachments · Content Options · Submit
Assign the author to an existing user, choose to download attachments and change URLs, then click [Submit].

[Download and import file attachments] is off by default. When you turn it on, media is downloaded from the old site address written in the export file, so the old site must stay reachable at that address during the import.

The URL change under [Content Options] is on by default and replaces addresses inside the imported posts that point to the old site with the new site's address. This feature works on WordPress 6.7 or later.

After I clicked [Submit], [All done. Have fun!] appeared, and the deleted test post came back with the same post ID. The categories were created with new IDs but kept the same slugs, and the custom field values and comments came in as well.

If you import the same file once more, [Post “…” already exists.] appears and that post is not created again.

5️⃣ What the built-in tools cannot move: migrating a whole site

To move themes, plugins, settings and media files in one go, use a migration plugin or a manual migration, both of which move the site files and database together. A manual migration connects to the old server over SSH, backs up the site files and database, and then restores them on the new server.

🔢 FAQ & Recommended Content

WP-CLI's [wp export] command creates the same WXR file as the admin screen. Use [--dir] to set the save folder and [--max_file_size] to set the size (in MB) at which the file is split.

On the export screen, choose [Posts] and split the content with the date or category filters to download several files, then upload them one by one on the import screen. You can also raise the PHP upload limit on the receiving server.

It is an XML text file, so it opens in Notepad or any code editor. Each post and page is stored as one [item] block, and you can check a post's status in the [wp:status] line.

ℹ️ Affiliate Disclosure
This site's content contains affiliate links. When a visitor buys a product or service through one of them, the site receives a commission from the seller. The amount the buyer pays(it goes down during event discounts ↓)does not go up. Posted prices, discounts, and stock reflect the time of writing and may differ, so confirm with the seller before buying. Products are chosen and reviewed by our own standards, and commissions do not affect the order or content of reviews.

Leave a Reply

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

Prove your humanity: 0   +   10   =