Squarespace to WordPress Squarespace to WordPress wordpress wordpress

Squarespace to WordPress


You will have to download your wordpress exported xml file and follow following steps:

Step 1 — Download Your Media Files
FTP to your site and download the folder /wp-content/uploads/

Step 2 — Create Amazon S3 Folder
Setup an account with Amazon S3. This is a affordable way to store files for VERY cheap.

Step 3 — Upload
Create new Bucket (Not so fancy name for folder) in S3 where we are going to upload our files, preserving the same file structure.The url path for my new images will be:https://s3.amazonaws.com/usoidudiod/uploads/We now have our images stored and backed up on Amazon S3.

Step 4 — Edit The XML File
Open your WordPress XML file in your favourite text edited. I use Sublime on the Mac.Now replace all instances of:/wp-content/uploads/with you new Amazon S3 folder url.

Mine looked like this:http://www.example.com/wp-content/uploads/replaced withhttps://s3.amazonaws.com/usoidudiod/uploads/

Step 5 — Import
Now go back to
Squarespace > Settings > Advanced > Import/Export > Click Import > Chose WordPress > Select Advanced.
Click the ‘Add a file’ and upload your newly edited XML file.

Fingers crossed that should all work for you now. :)


Squarespace detects that user agent in HTTP header is WordPress and rejects requests, they don't want to lose clients, very nice undocumented obstacle from Squearespace!

Solution

In core file wp-includes/class-http.php, replace line

'user-agent' => apply_filters( 'http_headers_useragent', 'WordPress/' . get_bloginfo( 'version' ) . '; ' . get_bloginfo( 'url' ) ),

with

'user-agent' => "Mozilla/5.0",

Both WP importer and 'Import External Images' plugin will start working properly


The best bet is to parse the XML and download the images and and any uploaded files from there. We had the same problem where we thought we'd got all the downloadable from a Squarespace site but hadn't.

We ended writing a script in R which we posted to GitHub as a package.

https://github.com/Deducive/sqspR

There are separate functions to get the download links for images and for any uploaded files such as PDFs.