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!
- Log into your squarespace account
- Click the site you want to move.
- Click Settings, then Advanced, then Import/Export.
- 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".
- Click export again
- 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.
- Hit the download button and save your export.xml file.
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.
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
- Download this brilliant Wordpress to Markdown script by Will Boyd.
- Install Node.js so you can run the script.
- Move your export.xml into the script folder
- 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.
- 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.
/outputfolder created is your entire site, exported as flat files.
npx degit 11ty/eleventy-base-blog my-11ty-project && cd my-11ty-projectfrom the terminal to set up a new blog using eleventy.
- Copy the
/outputfolder over into
/postsin your eleventy folder.
- Navigate your terminal to the eleventy folder and run
npm installand then
npx eleventy --serveand 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.