Scrape the website automatically by publishing the webflow project and upload it over SFTP to a webserver.
Due to european legal reasons (GDPR) some of our customers are insecure about webflow hosting. We wanted a solution where we could still design and develop with webflow but not be bound to the hosting.
- Payed Webflow plan
- Hoster with SSH support, PHP 8.0
- Github account
- Fork the project on Github
- Add Github project secrets https://docs.github.com/en/actions/security-guides/encrypted-secrets
REMOTE_HOSThost of serverREMOTE_PORTport of server (most likely 22)REMOTE_USERusername of SFTP-UserREMOTE_TARGETwhich folder to save the project otSERVER_SSH_PRIVATE_KEYused to authenticate sftp user (https://www.cyberciti.biz/faq/how-to-set-up-ssh-keys-on-linux-unix/)WEBFLOW_BASE_URLstaging url of your webflow projecthttps://your-project.webflow.ioADDITIONAL_URLSadditional urls of which files should be saved on your serverhttps://assets.website-files.com, https://d3e54v103j8qbb.cloudfront.netWEBFLOW_SITE_IDsite id of your webflow project; how to find it: https://www.briantsdawson.com/blog/webflow-api-how-to-get-site-collection-and-item-ids-for-zapier-and-parabola-usePERSONAL_ACCESS_TOKENgenerate an github access token: https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-tokenREPOSITORY_VENDORthe name of your repository consists of two strings "vendor/repository" use the first part before /REPOSITORY_NAMEthe name of your repository consists of two strings "vendor/repository" use the second part after /WORKFLOW_FILEthe name of the file located in.github/workflowsmost likelyproduction.ymlBRANCHthe name of the github branch most likelymainMAIN_FOLDER_NAMEbasically the url of your webflow project withouthttps://and without trailing/in this exampleyour-project.webflow.ioPUBLIC_URLthe domain on which the main site should runhttps://www.yourproject.com/
- Deploy the site to your server
- Point the domain of your website to the public folder
- Go to webflow > Project settings > Integrations
- At the bottom add a webhook
- Choose
site publishfrom the dropdown - The URL for the webhook will be
www.yourdomain.com/trigger/index.php
To debug or to enhance the project you need to node 14 and php 8.0 on your local machine.
The easiest way to debug your script locally is to let it run once and copy the .env file from your server into your local repository.
Should the script not run successfully just copy the .env.sample file and rename it to .env. Replace all the variables for example %WEBFLOW_BASE_URL% with the values you set in Github.
- Run
npm install - Run
npm run download
- Install composer
- run
composer install - Set up a local environment with php
- Link the local environment to the
publicfolder - Download Postman https://www.postman.com/downloads/
- Set up a POST-Request in Postman and set the URL to
yourlocaldomain.local/trigger/index.php - Set the body of the POST-Request to
raw - Insert
{ "site": "webflow-site-id", "publishTime": 1648037553150 }into the body - Send request
- Go to https://webhook.site/
- Copy the unique URL
- Add it in your Integrations tab
- Publish your site
- Form submissions - solution https://discourse.webflow.com/t/guide-custom-and-self-hosted-form-processor-for-your-webflow-forms-en-de/187275
- Time based publishing of content - kind of solution, run the deployment every hour?