Blogging & content · Guide
How to Export WordPress Posts (Step by Step)

Short answer
To export WordPress posts, go to Tools > Export, select Posts, choose any filters such as category, author or date range, and click Download Export File. WordPress saves an XML file you can import on another site. Use a plugin like WP All Export if you need CSV.
Key takeaways
- Tools > Export creates an XML file of your posts.
- Filters let you export by category, author, date or status.
- The export links to images but does not include the image files.
- Use WP All Export for CSV or Excel files.
- An export is not a full backup of your site.
How do you export WordPress posts?
Go to Tools > Export in your dashboard, choose Posts, set any filters such as category, author or date range, then click Download Export File to save an XML file of your posts.
That built-in tool is part of every WordPress site. It creates a WXR file, short for WordPress eXtended RSS, which is an XML format made for moving content between WordPress sites.
The file includes post titles, content, excerpts, categories, tags, authors, comments and custom fields. It does not include the actual image files, only links to them. We explain what that means for images further down.
If you want a spreadsheet instead of an XML file, skip ahead to the section on exporting posts to CSV.
What are the exact steps to export posts with Tools > Export?
Log in as an administrator, open Tools > Export, select Posts, pick your filters, and click Download Export File; your browser saves the XML file to your computer.
Step by step:
- Log in to your WordPress dashboard as an administrator
- Go to Tools > Export
- Select Posts instead of All content
- Optional: choose a category, author, date range or status
- Click Download Export File
- Save the XML file somewhere safe
The WordPress documentation describes each option on the Tools Export screen.
If you choose All content, the file also includes pages, media records, menus and custom post types. That is better when you are moving a whole site. Choose Posts when you only need blog content.
Large sites can produce very big XML files. If yours is several megabytes, the new site may refuse it because of its upload limit, so splitting the export by date range makes the import easier.
Before you export, it helps to tidy up. Delete spam comments, empty the trash and remove test posts you do not want to carry over. A smaller, cleaner file imports faster and gives you fewer surprises on the new site.
It is also worth noting the number of posts you expect to export. After importing on the new site, compare the count under Posts to confirm nothing was missed.
Which filters can you use when exporting posts?
When you choose Posts, WordPress lets you filter by category, author, start and end date, and status, so you can export only the posts you need.
| Filter | What it does | Example use |
|---|---|---|
| Categories | Exports posts in one category | Move a single topic to a new site |
| Authors | Exports one author's posts | Give a guest writer their work |
| Date range | Limits to a start and end month | Archive old posts by year |
| Status | Published, draft, scheduled, pending, private | Back up drafts only |
You can only pick one category or author per export. To export several categories, run the export more than once, or export everything and filter after import.
What does the WordPress export file include?
The XML file includes post content, titles, slugs, dates, categories, tags, authors, comments and post meta, plus links to attached media, but not the media files themselves.
When you import the file on another WordPress site with the importer, you can tick an option to download and import file attachments. The importer then fetches each image from the old site using its URL.
That only works if the old site is still online and reachable. If you are closing the old site, keep it live until the import finishes, or copy the wp-content/uploads folder separately by FTP or your host's file manager.
Theme settings, widgets and plugin settings are not part of the export. If you need those too, look at a full migration tool instead.
How do you import the exported posts into another site?
On the new site, go to Tools > Import, install the WordPress importer, upload your XML file, assign authors, tick the option to download attachments, and run the import.
The WordPress Importer plugin handles WXR files. WordPress prompts you to install it the first time you use the WordPress option under Tools > Import.
During import you can map each old author to an existing user or create new ones. Imported posts keep their dates, categories and tags.
Our guide on how to import a WordPress XML file covers each step and common errors.
For background on the tool itself, see what is the WordPress importer.
How do you export WordPress posts to CSV or Excel?
WordPress core cannot export to CSV, so use a plugin such as WP All Export, which lets you pick fields like title, URL, date and categories and save them as a CSV or Excel file.
A CSV export is useful for content audits, SEO reviews, sharing a post list with a client, or loading posts into another system that is not WordPress.
Basic process with WP All Export:
- Install the plugin from Plugins > Add New
- Go to All Export > New Export and choose Posts
- Drag fields such as Title, Permalink, Date and Categories into the layout
- Choose CSV or Excel as the file type
- Run the export and download the file
Our guide on how to use WP All Export covers filters and field options in more detail.
The plugin is listed on WordPress.org, and the vendor has its own guide to exporting WordPress posts with screenshots of each screen.
How do you export a single WordPress post?
The built-in exporter has no single-post option, but you can narrow filters to one date and author, copy the content from the code editor, or use a plugin that exports individual posts.
Quick options:
- Copy the blocks: open the post, use the editor's options menu to switch to Code editor, and copy everything
- Narrow filters: set the same start and end month and the author, which may isolate one post
- Duplicate first: on the same site, use a duplicate post tool instead of exporting
If you only need a copy within the same site, our guide on how to duplicate a post in WordPress is faster.
How do you export posts from WordPress.com?
On WordPress.com, go to Tools > Export, choose Export all or a custom export of posts, and WordPress.com emails you a link or offers a download of the XML file.
WordPress.com also offers a separate media library export, so you can download your images as an archive. The WordPress.com export guide explains both options and how plan type affects them.
The XML file works with self-hosted WordPress too, which makes this the usual first step when moving from WordPress.com to your own hosting.
Can you export posts with WP-CLI?
Yes, if you have command-line access, the wp export command creates the same WXR file and lets you filter by post type, category, author and date.
A simple example:
wp export --post_type=post --dir=./exports
The wp export command reference lists every option, including how to split large exports into several smaller files.
WP-CLI is handy for large sites where the dashboard export times out. It runs on the server, so browser and PHP web limits matter less.
What if the WordPress export fails or the file is empty?
Failed or empty exports usually come from PHP time or memory limits on large sites, a plugin conflict, or a filter that matches no posts.
Check these points:
- Remove filters and try exporting all posts
- Export smaller date ranges, such as one year at a time
- Raise PHP memory and execution time limits
- Deactivate plugins that add heavy output to posts, then try again
- Use WP-CLI if the dashboard export keeps timing out
Our guide on fixing WordPress export errors covers more specific error messages.
Should you use the export file as a backup?
No, an export file is not a full backup; it leaves out media files, theme files, plugins, settings and the database tables plugins create.
It is fine as an extra copy of your writing. For real protection, use a backup plugin or your host's backup tool, which saves files and the full database together.
To understand the difference, see can you export a WordPress site, which compares exports, backups and full migrations.
Frequently asked questions
Does exporting WordPress posts include images?
No. The XML file includes links to images, not the image files. The WordPress importer can download them during import if the old site is still online. Otherwise, copy the uploads folder separately.
Can I export WordPress posts to Excel?
Not with the built-in exporter, which only creates XML. Use a plugin such as WP All Export to choose fields and save them as a CSV or Excel file that opens in a spreadsheet.
Can I export posts from only one category?
Yes. Under Tools > Export, choose Posts and pick the category from the dropdown. You can only choose one category per export, so run the export again for each additional category.
Will exported posts keep their dates and categories?
Yes. The XML file stores publish dates, slugs, categories, tags, authors and comments. When imported with the WordPress importer, posts keep those details and you can map authors to users on the new site.
Why is my WordPress export file empty?
Your filters may match no posts, or the export may have timed out on a large site. Remove filters, export smaller date ranges, raise PHP limits, or use WP-CLI to export from the server.
Sources
- Tools Export Screen WordPress.org Documentation
- WordPress Importer WordPress.org Plugins
- wp export WP-CLI Command Reference
- Export your content WordPress.com Support
- WP All Export WordPress.org Plugins
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.
Thanks — we review requests within 3 business days.
Related guides
About the editors
Researched from the primary sources listed above and checked against our editorial rules before publishing.


