Convert Squarespace to WordPress Plugin

Plugin Information

This plugin will convert your squarespace posts to wordpress. Tabove video will give a brief overview of the process involved.

Currently, the plugin is hosted at github and you can download it here: https://github.com/gfreeau/squarespace-to-wordpress-plugin.

The direct link to download the zip is here.

Unzip the folder ‘squarespace-importer’ to your plugins directory.

This is based on the existing typepad and movable type plugin with a few changes to work with squarespace and also the ability to download your images.

Installation Notes

To use the importer you will then need to add the following to your wp-config.php file. This is the url to your squarespace site, the importer will use this to get the absolute urls to your images.

This plugin will import squarespace blog posts and also download the images for you automatically. This is an early version so please try on a backup version of your site database first.

Users on shared servers like dreamhost or hostgator may have trouble running this script if you have a lot of posts because they restrict your hardware resources and/or the time you can have a running process. If you are having timeout trouble, contact your host and ask if you can increase your max_execution_time in php and/or memory_limit. I suggest running this script on a dedicated server for a large import.

A solution to this problem is to split your import file into smaller parts such as 50 posts per import. An explanation on how to do this is beyond the scope of this article and is more advanced. You have to keep in mind if you are importing a squarespace site with 1000 posts and every post contains a few images, this script will be downloading hundreds of megabytes of images into your wordpress installation.

To get an export of your current squarespace blog posts, click on structure > configure this page. Go down to Data Export and Export Blog Data to get a backup of your posts.

Once this plugin is installed and activated it will be available under the Tools > Import.

The plugin was recently changed to match more squarespace image tags and as a result after the import there may be some left-over html in your post code. This won’t affect the view in your browser and you may even use this extra markup to apply css styles. If you want to clean this all up there are other plugins available for this.

Workaround for spaces in squarespace image names

Note: This plugin will not download images that have spaces or some special characters in them, this due to a wordpress bug that will probably be fixed in wordress 3.5: http://core.trac.wordpress.org/ticket/16330.

This is a quick fix that will allow the importer run and import squarespace images that contain spaces. First it relies upon using the curl extension so make sure you have that enabled in PHP.

Now open: /wp-includes/class-http.php on ~ line 1085 and find:

change to:

Then open: /wp-admin/includes/media.php on ~ line 603 find:

change to:

This should now import your squarespace images with spaces.

 

 

,

61 thoughts on “Convert Squarespace to WordPress Plugin

  • John B says:

    First, thanks for creating this plugin. However, I’ve run into a problem with it. The importer fails downloading images that have spaces in the file name.

    For example, the import fails to download files named like this:

    barbou bred.jpg
    ili brunch.jpg
    pl stk.jpg

    The importer works just fine aside from that.

    • Greg Freeman says:

      I’m sorry for taking a long time to reply, however if you see my comment before, I can fix this if people provide me with some test sites and import data.

    • Greg Freeman says:

      I have included a work-around for the spaces problem, maybe it will help you.

  • Dave says:

    Worked great – thank you so much. As John said though – images w/ a space did not import.

    • Greg Freeman says:

      I’m aware of this, to really improve this plugin I would need more square space sites to test for. I originally wrote some basic scripts to help a friend out before discovering lots of people are looking for it. I don’t actually use squarespace myself.

      If some people give me their squarespace URLs and import dumps, I can test my plugin for their sites and improve it for everyone else.

  • cyberwhale09 says:

    Good plugin, its working fine….

  • […] ‘configure this page’ dialog using the export button). Then to get images I am using the Greg Freeman plugin; I keep checking in and gradually more and more images show up every day, hopefully it will get […]

  • Chris says:

    Could anybody help me with how to add the appropriate line of code to wp-config.php? Thanks

  • Chris says:

    I think I was able to edit the wp-config.php, but now I have this when installing the plugin:

    Installing Plugin from uploaded file: squarespace-importer.php
    Unpacking the package…

    The package could not be installed. PCLZIP_ERR_BAD_FORMAT (-10) : Unable to find End of Central Dir Record signature

    Return to Plugins page

  • Chris says:

    I was unzipping the plugin before uploading. Rookie mistake. Thanks

  • Chris says:

    Ok, Thanks again that worked great, I now have all my Journal Posts. Any chance you can give some advise for importing squarespace galleries into WordPress?

    • Greg Freeman says:

      The galleries are a little harder, I’ve done it but it usually requires custom regular expressions based on the template used for your squarespace site (if it’s been modified from squarespace default). Can you give me a URL to one of your galleries?

      I could provide some sample code for the default squarespace html and people can modify it from there.

  • Mark Vanderberg says:

    Has this been tested with WordPress multi site?

    • Greg Freeman says:

      It hasn’t been tested for multi site, however it is based on an existing importer so there is a good chance it will work.

      • Michael says:

        Does not work in multisite environment:

        Warning: Invalid argument supplied for foreach() in /public/sites/www.miejooswebdesign.nl/wp-admin/includes/class-wp-upgrader.php on line 558

        Het pakket kan niet geïnstalleerd worden. Er zijn geen geldige plugins gevonden.

        Plugin installatie mislukt. (Installation failed)

  • Chris says:

    Hi Greg – I’ve been getting an internal server error when using the the plug-in. I have no problem installing/activating the plugin, but when it comes to assigning authors and hitting “submit,” I get the error. Any insight?

    Thanks!

    • Chris says:

      After more investigation, I’ve found that the transfer begins, and some files move, and then (I’m assuming) stop when the error occurs. Bizarre!

  • Will says:

    Hey Greg, I tried using the importer however it did not transport any of the images over sadly. I believe I setup everything properly. Any chance you could help me troubleshoot?

    • Greg Freeman says:

      Are you running the script on a local development server? a shared host? It could be your php memory limit or script execution time. I recommend running this script on a server with dedicated resources or a local development server. On windows there is one click installs such as WAMP and on OSX you could use MAMP. If you are using linux, I assume you know how to set this up yourself.

      • Will says:

        Hey Greg, doing it on a host. Once it only transfered one image out of several hundred for some odd reason. It looks like the preg_match_all seems to be skipping pretty much all the other image files. Is there a way I can send you my export file from SS and you could take a look real quick?

  • SquareUltra says:

    Thanks dude! Pretty great plugin. Some blogs are just better suited for WordPress than Squarespace

  • […] E senza dire niente a nessuno, mi svegliai una mattina, feci un giretto su Google, trovai Questo Plugin e passai una mezza giornata (ok, due giorni, ma erano piu’ prove tecniche che altro) a […]

  • Leland Flynn says:

    Greg,

    Thanks a ton for making this plugin available to everyone. I am having some trouble getting it installed on WP 3.4 however. I am installing from a the zip file linked to above but continually receive this error:

    Unpacking the package…

    Installing the plugin…

    The package could not be installed. No valid plugins were found.

    Plugin install failed.

    I am likely missing something glaringly obvious here but I hope you might be able to point out that something.

    • Greg Freeman says:

      Could you try unzipping the downloaded file and uploading it manually to wp-content/plugins. Does it still fail?

      • Niels says:

        I was experiencing this problem and it also didn’t work if I uploaded the contents of the ZIP as it was.

        Problem is that the ZIP-file has an extra layer of directories. If you unzip locally, you need to have the squarespace-importer.php and languages/ in the directory you place in wp-content/plugins, not nested in a sub-folder.

        • Greg Freeman says:

          This is correct, this is just because the plugin is hosted on github. When you create the zip it puts all of the project files inside folder named after the project.

  • Niels says:

    Sadly it seems that if the image in a sqarespace post is a thumbnail for a larger picture, the plugin only transfers the thumbnail.

    For instance, compare:
    http://qdn.squarespace.com/quilombo-bloggen/2007/1/27/batizado-2007-kick-off.html
    with
    http://www.bosworth.dk/ginga.dk/?p=196

    at the second site, clicking the thumbnail takes you to a rewritten url, which doesn’t exist on the wordpress server.

    Let me know if you could use more information.

    • Greg Freeman says:

      The download_images function needs more logic to check if the img tag is wrapped in a A tag that contains a link to another image hosted on squarespace. It could then assume that the embedded img tag is a thumbnail and it should instead grab the full size image.

  • Niels says:

    …Another thing. It seems to not work with bmp files etc. is there a way to generalise this import, so it’ll collect all attached files from squarespace?

  • Thank you for such a helpful plugin! Have you heard of issues with tags being imported? Everything else imported fine, but there are no tags. I did find an article about a similar issue, but in that case, the tags did import and just weren’t showing in the posts — I checked the database, and the tags didn’t import at all. I did warn the client ahead of time that migrations are unpredictable and sometimes things just don’t import, but I hate to have to tell her she has to manually reenter all of her tags! Any thoughts?

    • Greg Freeman says:

      Hi Lisa, it will import tags using the KEYWORDS directive in the data file you exported from squarespace. If you open that file do you see posts in a format similar to this?

      AUTHOR: Someone
      TITLE: Title of post
      KEYWORDS: tags,here
      DATE: 09/05/2006 10:06:47 PM
      —–
      BODY:
      My post content
      —–

      • Thanks for the quick response! It looks like Squarespace only exported the categories, not the tags — I’m not seeing keywords in the file. If I imported a new file, would the importer recognize the existing posts and add the tags? At this point, there’s no way to start over.

        • Greg Freeman says:

          If you are able to get the tags from squarespace, you can use the wordpress function wp_add_post_tags to add the tags to your already included posts.

          e.g wp_add_post_tags(1, ‘my,tags,here’);

          where 1 is the post id and ‘my,tags,here’ is a tag list separated by commas.

          The importer won’t add to existing posts, it will recognize it’s been imported and stop. The easiest way would be the do the import over again, however you mentioned you cannot do this.

          It’s doable, it just requires a bit of custom code. Check out this post, the content is irrelevant but it shows how to set up a standalone php script that loads the WP libraries. Then you can call the above function.

          Greg

  • csBailey says:

    I used your plugin and it says it worked but nothing is uploading. Hostgator told me there was a problem with the plugin script. Has your plugin been repaired yet?

    • Greg Freeman says:

      The plugin works fine, it sounds like you are having permission errors or php is timing out. You are running this script on a shared host, I recommend that you don’t do that for the exact issues you are experiencing.

  • Katherine says:

    Hey Greg, also managed to upload the Squarespace export successfully but did not have any data imported, even though it displays a success message. Found that the plugin did not recognise any author data, had the same issue with Moveable Type plugin. WordPress import plugin recognises authors and imports data but continues to link images hosted on squarespace. Did I do something wrong or has there been a change in Squarespace export?

    • Greg Freeman says:

      Hi Katherine, Are you using squarespace 5 or 6? This plugin is for version 5. If you are using version 5, you can send a link to your export file in the contact form above and I’ll test it.

  • debra says:

    Hey! I just wanted to ask if you ever have any trouble with hackers?

    My last blog (wordpress) was hacked and I ended up losing a few months of hard work due
    to no data backup. Do you have any methods to protect against hackers?

  • Jay Cackowski says:

    Hey Greg,

    I’m having the same issue that Lisa is having with importing tags (Squarespace to WordPress).

    Was wondering if you could outline the procedure for completing a Squarespace import into WordPress that would include tags.

    I saw your previous post “How to Import Posts from a Text File into WordPress” but am a little confused as to how it would be implemented for this situation.

    Additionally, I am also having the other problem that Lisa is having, in that Squarespace isn’t exporting the tags.

    Any direction you could offer would be helpful and appreciatd.

    Thanks!

    • Greg Freeman says:

      Hi, squarespace doesn’t make it easy for people to move that is for sure. Whenever I am converting sites for people, I almost always have to write custom scripts to make sure everything is exported/converted.

      I can’t be more helpful than that, it’s not a 100% user friendly process. If they are not exporting your tags, you would have to have a tool to manually get that data.

  • Hi Greg,

    I tried the ss-export.txt method and nothing uploaded, then I tried uploading the xml file off of my computer and I was told it was empty. I think the way that my school’s website was arranged they never actually had any posts, it’s all done as pages.

  • I can’t get any of the plugin files to install, WordPress 3.5.1 says The package could not be installed. No valid plugins were found. Plugin install failed.

  • Gunpowder says:

    Hi I have managed to import a whole Jornal blog form Squarespace to a local (MAMP) copy of a wordpress site. All fine apart from no images have turned up. When I look in the media folder there are lots of untitled files with no images. It says:


    (no title) JPG
    Edit | Delete Permanently | View
    gunpowder
    SUPERSIZE, 2013/11/06

    0
    2013/11/06

  • Dasha says:

    Hello,

    Thank you very much for the plugin! I’m migrating SquareSpace 5 into WordPress 3.8 – all seems to be migrating fine – posts and images. Categories seem to be appearing fine per post too.

    However, tags for each post, don’t seem to come through. Any idea why? How’s it possible to fix it?

    Many thanks,

    Dasha

    • Greg Freeman says:

      This can’t be fixed, squarespace doesn’t export tag data, there are other ways to do it, but it involves custom scraping.

  • David Obura says:

    Hi Greg – interesting posts – I’m about to try migrating from SS5 to WordPress, and looks like it works well in the most recent attempt! Thanks for providing this. Mine is a relatively simple website. I’m going to study the options a bit more, then may try it – I have another 100 days on my SS account so not in a hurry. My one concern (being a newbie) is the domain name, as I want to keep the domain name the same (cordioea.net), but haven’t worked out how to set up the two simultaneously – or can I migrate first to another domain (e.g. cordioea.info) then convert this to cordioea.net once the migration is complete? Newbie question, sorry!

  • Urban says:

    Hello, I’m using squarespace-importer pluging, I’m following every step described in this post without success. At the end of the process Iget the message

    All done. Have fun!
    but nothing has been imported. Any suggest?

    Thanks!

  • Nate says:

    You are so incredibly awesome! Thank you so much for doing this and for giving it away free!

    I just used this to import a Squarespace site in October 2014 so it should still be good for anyone to do as of this moment. I took a tip from the person earlier who said it worked with WP 3.9 and so I did a local install of 3.9, ran the plugin with the changes noted above for the images with blank spaces and ¡voila! 860+ blogposts and images imported in about 20 minutes! Amazing! I love you!

  • Nate says:

    It seems to work fine except…

    the_excerpt() doesn’t work properly in WordPress.

    The thumbnail image for the_excerpt() has completely bizarro Squarespace code and displays a broken image.

    I’m really not sure why that would happen since when you click through to the article, the images display perfectly. It’s only in the_excerpt() which is problematic for search and widget areas featuring Recent Posts.

  • nate says:

    Hi,

    Works great except for images in post_excerpt. All the other images import flawlessly.

    Any images in post_excerpt show up as broken with an image source pointing to Squarespace.

    For example:

    This is only a problem if you want a thumbnail image to display anywhere post_excerpt might be displayed, like Search Results or something.

    I think it’s just one oversight that you could probably correct easily.

    MY SOLUTION:
    I have been trying to figure it out for weeks, but it’s beyond my knowledge level… I “solved” the problem by using CSS to hide images loading from post_excerpt.

  • Gabi says:

    Awesome plugin — you saved my day.  I did Squarespace 5 to WP 4.1.1 , uploaded to shared hosting, didn’t change the txt file and it all worked great. Thanks!

  • Carol says:

    I’m having an issue installing the plugin itself. I edited the WP-config file, but am still getting this issue:

    Unpacking the package…

    Installing the plugin…

    The package could not be installed. No valid plugins were found.

    Plugin install failed.

     

    Any advice?

  • Lucas says:

    Hi

    When I export data from my squarespace site, it only includes 5 posts. I carried out your instructions and was all good apart from that. My site is: http://amyraphael.squarespace.com   and the posts are on this page: http://amyraphael.squarespace.com/current-work/   see there are literally over 100 posts!

    Please help!

    Lucas

Leave a Reply to Potenza della Noia: Traslocai di Nuovo - DElyMyth - /dev/null Cancel reply

Your email address will not be published. Required fields are marked *