In this video I’ll show you how you can deploy your website to an FTP server with BitBucket Pipelines.

Watch the next video (Deploy a static website to Amazon S3 with s3_website):

Or watch the previous video (Using environment variables):

► About BitBucket Pipelines
BitBucket Pipelines is a continuous integration tool built-in to Atlassian’s BitBucket service. It’s currently in closed beta.

More information on the Atlassian website:

► About me
Follow me on Twitter:
Check out my blog:
Like my Facebook page:

Comments (29)

  1. For some reason, this stopped working on 2 of my accounts. Getting fatal error:
    "Could not get last commit. Network down? Wrong URL? Use 'git ftp init' for the initial push., exiting…

    I tried init and it just says it cant connect. Rechecked username and passwords and it still fails.

    Not sure what it is.

  2. brilliant! I spent half a day today for finding automation solution and then trying to convince my server to accept pipeline with sftp into the correct folder. This has solved my issue in 4 minutes! Few light bulbs lit up too! Thanks

  3. I could do several deployments without any issue however now I am getting this error message in Bitbucket: "Check your deployment configuration
    We didn't find the deployment keyword in your bitbucket-pipelines.yml file."

  4. Hi Savjee,

    Thank you for sharing this and it is very useful! I was wondering, if LFS is turned on to deal with large binary files, then can we still use this method to deploy the actual binary files via FTP? If we don't make any changes to the yml file, then only the pointers will be uploaded and the actual binary files won't be uploaded via FTP. Any idea how to get it to work?

    Thanks in advance!

  5. your first step says to do a bash script execution inside pipeline or your web server? like the apt-get update and apt-get install?

  6. Cool tool btw. One thing, it's really annoying to confuse between "git init" and "git ftp init". since "git init" only doing initialization to the repository but "git ftp init" doing initialization and also at the same time push the code-files to the server.

  7. Does the main website automatically update when i push new changes? I would like to do this manually. meaning only deploy after certain tasks have been completed

  8. How could you make custom pages based on that template? Pass in or get some JSON of a logo URL and auto create html pages with some variables?

  9. Hey Savjee!

    Great video! I have a question regarding deploying a website to FTP server.

    Let's say I have a dev site and a live site and I want to deploy my changes to both dev and live site. What is the best way to do that?

    Also, do I need to do everything in Pipeline and can't do it on my terminal?


  10. Hey there, 

    Some questions I have – I have a large WordPress website and I have a repository that is only for wp-content and some folders in there – if I setup the Git-FTP operation as instructed in this video will Git-FTP delete files when it pushes? My biggest concern is that files will get deleted. Any input would be much appreciated. Thanks!

  11. Hello Savjee, good video, I jsut have a question, I am working with Codeigniter. Can I use Enviroment Variables for configuration like base_url or database? for example, I have test site and production site. both on different servers with different domains and different database, so what I want is that when pipeline is running it can complete these fileds with the proper information depending on the branch being updated.

  12. 3 out of 5 times I get "fatal: Dirty repository: Having uncommitted changes. Exiting…" My repo is 100% for sure not dirty and all work has been committed. Without making any changes whatsoever, I try again via manually running the pipeline and it will almost always work on the 2nd or 3rd attempt. Any suggestions?

  13. I'm getting error:
    git ftp init –user $FTP_USERNAME –passwd $ftp_password
    fatal: Remote host not set.

    I've set global variables in settings. please guide

  14. hi…thanks a lot. It helped me to start with pipelines.
    when I go for git init, got following error and build failed.I am not able to resolve.Please help me.

    git ftp init –user $FTP_USERNAME –passwd $FTP_PASSWORD
    fatal: Dirty repository: Having uncommitted changes. Exiting…

  15. Hi, nice video… Have a question.. could I add all the files (CMS) first (upload to server) and then config the pipeline (in order to save on 50 min free account time)??

  16. Thanks for the walkthrough! I just used it to deploy changes to my website.
    Side note: If you have a blog or something else that is not managed by version control, add it to .git-ftp-ignore so it doesn't get overwritten when your changes are pushed.

Comments are closed.