A WordPress export file (Tools > Export, the .xml file also called WXR) holds your posts, but it is hard to read: each post is a block of XML with CDATA sections, nested category tags and post meta. To review the content in Excel or Google Sheets, hand it to an editor or prepare it for another system, you want a CSV with one row per post. Generic XML-to-CSV converters produce dozens of columns like wp:post_date_gmt and lose the categories. This guide converts the file with WordPress itself and Import Export by RockStarLab: import the XML into a WordPress site, then export the posts to CSV with only the columns you choose.
Free: both steps work in the free plugin. We tested with Import Export by RockStarLab 2.2.13 and WordPress 7.1.
Short Answer
On a test WordPress site (a local site or a staging copy), go to Import Export by RockStarLab > Import, choose Blog Posts, upload the .xml file and click Auto Map. Then open Export, choose Blog Posts, drag in the columns you need (Title, Date, Slug, Category Names, Content…) and export as CSV or XLSX.
Why Not Convert the XML Directly?
A WXR file is built for WordPress, not for spreadsheets. In our test file of 8 posts, the plugin’s file preview showed 28 columns for each item, from title and link to guid@isPermaLink, wp:post_date_gmt and wp:ping_status:

A post with two categories has two <category> elements, and tags use the same element with a different domain, so a flat converter keeps only one value per column or splits them over extra columns. Custom fields are stored as pairs of wp:meta_key and wp:meta_value. Importing the file into WordPress first turns all of that back into real posts, categories, tags and fields, and the export then writes clean columns.
Step 1: Import the XML File into a Test Site
Use a site you can throw away: a local WordPress (for example LocalWP or WordPress Studio) or a staging copy. On a site that has no posts of its own, Step 2 is simpler.
- In Import Export by RockStarLab > Import, choose Blog Posts and upload the
.xmlfile. - Click Auto Map. In our test it mapped 15 of the 28 columns: title, content, excerpt, date, slug, status, author, categories and the rest of the post fields.
- Start the import.
All 8 posts were created in one second, with their original slugs and dates. A post that had two categories in the XML (Coffee Origins and Roasting Notes) got both.
Step 2: Export the Posts to CSV
In Export, choose Blog Posts. If the test site has other posts too, add a filter on the Filters step, for example ID greater than the last post ID before the import. On the Fields step, drag in the columns you want, in the order you want them. We used nine:

On the Format step, choose CSV, or XLSX to open the file directly in Excel:

The result has one row per post:
| post_title | post_date | post_name | category_names |
|---|---|---|---|
| Kenya AA Roast Profile | 2026-11-13 18:59:34 | kenya-aa-roast-profile | Coffee Origins, Roasting Notes |
| How to Dial In a V60 for Light Roasts | 2026-11-13 18:59:34 | how-to-dial-in-a-v60-for-light-roasts | Brewing Guides, Roasting Notes |
| Ethiopia Guji Natural: Brewing Notes | 2026-11-13 18:59:34 | ethiopia-guji-natural-brewing-notes | Brewing Guides, Coffee Origins |
| How We Taste New Coffees | 2026-11-13 16:42:48 | how-we-taste-new-coffees | Uncategorized |
The Author Name, Excerpt and Content columns were filled as well. Tag Names and Featured Image URL stayed empty because these posts had no tags or featured images.
With WP-CLI or an AI Agent
Both steps run without the admin screens too. With WP-CLI on the test site, one command imports the XML (the columns are matched to the post fields by name) and one writes the CSV with the columns you list; the filter keeps only the posts created by the import:
wp rsl-ie import coffee-blog.xml --type=post --user=admin
wp rsl-ie export --type=post --status=publish,future,draft --fields=post_title,post_date,post_name,category_names,post_content --options='{"filters":[{"field":"ID","condition":"greater_than","value":"67"}]}' --name=coffee-blog --user=admin
We ran these two commands on a clean test site with Import Export by RockStarLab 2.2.63 and a WXR file of 7 posts: import job 4 created the 7 posts with their categories, and export job 5 wrote a CSV with one row per post and the categories as names, for example Classic, Uncategorized.
An AI agent does the same through the WordPress MCP Adapter. WordPress itself gives the agent only read-only abilities for site, user and environment information; the upload, import and export come from the plugin:
With Import Export by RockStarLab, import the attached WordPress XML file as posts on this test site, then export those posts to CSV with title, date, slug, category names and content.
Tips
- Content is HTML. The Content column holds the post’s HTML with Gutenberg block comments. That is what WordPress stores; keep it if the CSV goes back into WordPress later.
- Featured images: a WXR file only contains them when it also includes the media items, which Tools > Export > All content does. With Automatically Import Media Files on, the import downloads them from the old site, so it must still be online.
- Pages and custom post types work the same way: choose Pages or the post type in both steps.
- Excel and accents: tick UTF-8 BOM in the CSV options if Excel shows accented letters wrongly, or export XLSX.
FAQ
How do I convert a WordPress XML export to CSV?
Import the XML file into a test WordPress site with Import Export by RockStarLab (Import, Blog Posts, Auto Map), then export the posts to CSV with the columns you choose. Categories, dates and slugs come out as clean columns.
Can I open a WordPress XML file in Excel directly?
Excel can open XML, but a WordPress export becomes a wide table with one column per XML element, several rows or columns for categories, and no clean list of tags or custom fields. Importing into WordPress first gives a much simpler result.
Do I need a live site for this?
No. Any WordPress install works, including a local one on your computer. The conversion does not touch the site the XML came from.
Can I export to Excel instead of CSV?
Yes. Choose XLSX on the Format step; ODS, JSON and XML are available too.
Related Guides
- How to Export WordPress to Excel: Built-In Export vs a Plugin
- WordPress Tools > Export Limitations: What the Built-In Exporter Doesn’t Move
- Fixing Wrong Dates, Lost Leading Zeros and Scientific Notation in an Exported CSV
Get the free plugin on WordPress.org.

Comments 0
Have a question or a tip to share? Leave it below.