> ## Content Index
> Fetch the complete content index at: https://chrisenns.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# Exporting Eleventy Blog Posts to WordPress Issues
- URL: https://chrisenns.com/2023/08/exporting-eleventy-blog-posts-to-wordpress-issues/
- Published: 2023-08-15T06:00:00.000Z
- Updated: 2024-04-02T21:19:27.000Z
- Description: I wish I hadn't moved to a "easy" flat file system for my blog's CMS.
- Author: Chris Enns
- Tags: Eleventy, CMS, WordPress

---

**2024-04-02 Update*: In the meantime I've started moving my content to Ghost instead of WordPress. We'll look back in a few years and see if I regret my choice?*

---

Summary: I'm trying to export my Eleventy posts to a format that can be imported into WordPress and keep getting an error when I try to build it.

### What I Want to Do

*TL;DR* Get my Eleventy content (blog posts) into whatever format to be able to import them into WordPress, ideally with the title, date posted, and text content intact. Images are secondary at this point.

I've been using [Eleventy](https://www.11ty.dev/?ref=chrisenns.com) as the CMS for my blog for a few years now. But I'm not really a developer, I just [have a lot of friends who are developers](https://www.lemonproductions.ca/portfolio/?ref=chrisenns.com). And so I'm in way over my head whenever it's anything beyond publishing a new post or updating a page. I think a move back to [WordPress](https://wordpress.org/?ref=chrisenns.com) land in one form or another might help me be able to try random things with my blog like importing and displaying [my micro.blog](https://microblog.chrisenns.com/?ref=chrisenns.com). Which might help [me release my dependance on Twitter](https://twitter.com/iChris/status/1686431681367117824?s=20&ref=chrisenns.com). But probably not. I just really hate "X".

### How I'm Trying to Do It

I'm using [Andy Bell's explainer](https://andy-bell.co.uk/importing-eleventy-content-into-wordpress/?ref=chrisenns.com) on adding a `wp.njk` file inside my Eleventy install that is supposed to generate a `wp.xml` file out the other side. You can [see my current implementation of it on GitHub](https://github.com/iChris/chrisennsdotcom/blob/master/src/wp.njk?ref=chrisenns.com) or [here if it's not able to build with it in my repo](https://gist.github.com/iChris/5fbadb85cec73285eb80cada39f900e7?ref=chrisenns.com).

The only change I made was where Andy is using `for item in collections.items`, I thought I should change that to `for item in collections.posts` since that's where my blog's posts are in `/posts/`. But I could be wrong there?

Side note: I started using Eleventy based off Andy's excellent [starter kit for Eleventy - Hylia](https://hylia.website/?ref=chrisenns.com). No shade to Andy or his code. I know the error exists between the keyboard and chair on this one.

### The Error(s) I Get

When I build it on Netlify, [this is what the content of the wp.xml file](https://gist.github.com/iChris/86974bf7622af0ea0f5bc6a50d8d7fb8?ref=chrisenns.com) looks like.

And I get [this error message in my Netlify console](https://gist.github.com/iChris/eec8862c2dec39c4e76f5c3a83ff1c8e?ref=chrisenns.com).

The error from Netlify seems to have a lot more issues than just me trying to add a wp.xml file—but the errors don't show up if I commit without that `wp.njk` file included.

### Help

Any suggestions on how to get my Eleventy content into a WordPress usable format? If you don't already know how to reach me, feel free to find me on [Twitter](https://twitter.com/ichris?ref=chrisenns.com) or [submit a suggestion on GitHub](https://github.com/iChris/chrisennsdotcom/?ref=chrisenns.com).