How to move from Squarespace to Eleventy

A personal blog isn't worth $100 a year. That's the thought that struck me when it was time to renew my squarespace subscription a few months ago. Instead I decided to move to something more light weight.

I didn't want WordPress, I've used WP a lot over the years and I've increasingly felt it's old school to the point of being annoying. So I went with simple text files, and used Eleventy to render those into web pages (thanks to TDH for the tips about Eleventy).

Then it just became a struggle of finding out how to move from Squarespace to Elventy. This is how.

Export your stuff from Squarespace

Squarespace has a lot of special features. And they haven't spent a lot of time making sure you can export it. Instead we'll have to rely on the standard: Wordpress. All your pages and blogs will be exported properly. I have no idea about anything else.

This only works before you cancel your subscription!

  1. Log into your squarespace account
  2. Click the site you want to move.
    The site you want to export
  3. Click Settings, then Advanced, then Import/Export.
    Find export in the advanced menu
  4. Choose which blog should be your main one, this correlates to what WP knows as the post type "post". The others will get custom post types based on their URL format, in my case "journal" and "talks".
    Choose a feed to use as main blog
  5. Click export again
  6. Wait while Squarespace creates the export XML file. This can take quite a while, since they seem to batch these export jobs in the background.
  7. Hit the download button and save your export.xml file.
    Just press download

Now comes the tricky part. If you want to import this site into a new Wordpress installation, it works just like a normal Wordpress import:
8. Open your Wordpress admin
9. You might need to add support for custom post types corresponding with any blog feed you exported before you run the import. If you need to, here's a guide.
10. Go to tools and click import
11. If needed, install the plugin for importing wordpress xml files.
12. Find your export.xml file and import.
13. Done!

But if you're not interested in Wordpress, and like me would like to move to a flat file cms like eleventy?

Import your stuff into Eleventy

  1. Download this brilliant Wordpress to Markdown script by Will Boyd.
  2. Install Node.js so you can run the script.
  3. Move your export.xml into the script folder
  4. Open a terminal and navigate to the script folder and run the following command: npx wordpress-export-to-markdown. For advanced choices see the script guide on Will's GitHub repo.
  5. Make sure to use the --save-attached-imagesoption so you download all the images from your old site. Otherwise these will be lost when you close your Squarespace subscription.
  6. The /output folder created is your entire site, exported as flat files.
  7. Run npx degit 11ty/eleventy-base-blog my-11ty-project && cd my-11ty-projectfrom the terminal to set up a new blog using eleventy.
  8. Copy the /output folder over into /posts in your eleventy folder.
  9. Navigate your terminal to the eleventy folder and run npm install and then npx eleventy --serve and that's it! Your Eleventy export is done!

That's it! Hope this quick guide helps you get started.

I'd also recommend using Vercel to host it. Here's the guide for taking it live with their excellent Now service.