Search code examples
squarespace

Can I store database information in Squarespace


I am thinking of moving from Wordpress to Squarespace but have written a custom plugin for wordpress that regularly updates a news feed. I have looked through the Squarespace documentation and it seems rather restrictive. Is there any way to store database information in Squarespace and run a cron job?


Solution

  • No, you can only add "client-side code" to a Squarespace site, and not "server-side code".

    You can't add server-side code

    Server-side code is handled by a server, not by a browser, and includes: PHP, Ruby, Ruby on Rails, SQL

    So you'd have to find some other service to run your cron job, a separate server, etc. A couple solutions used by Squarespace devs. who also need database functionality is Firebase, or Google Sheets + Apps Script. For example, you'll see a lot of Squarespace users sending their data to Google Sheets, then using Zapier and/or Apps Script to manipulate data and trigger other services. Of course, the endpoint then needs to be accessible via Javascript/AJAX in order to display data on your site.