In this article, I’ll walk you through how to easily and automatically deploy code from Bitbucket to your FTP server within minutes.

We generally advise using SSH over FTP, as FTP tends to come with some inconveniences that SSH doesn’t have. That said, using SSH isn’t always an option whereas FTP is almost universally available if you’re using shared hosting.

When you manually upload files to your test and/or live server(s) using an FTP client, you might frequently run into any of the following situations:

  • You’ll have to manually keep track of which files have yet to be uploaded, which have already been uploaded, and which of those have been changed - introducing a window for potentially costly or frustrating mistakes.
  • Uploading your entire site for every new version can take a long time when using FTP. Every file is uploaded individually, which introduces the risk of an “FTP connection time-out”, meaning only some of your files will have been updated.
  • Deleting files via FTP is very slow: every file is processed individually rather than entire folders at once.
  • Collaboration is nearly impossible. If you’re working with a team you’ll find yourself wondering who is going to upload the new version, or has this already been done? Does everyone get their individual FTP credentials for the target server?

Before we get started 

When you first start using Launchdeck to improve your deployment process and development workflow, it’s important that you’re already have a Git repository, and have access to an FTP server that you wish to deploy code to.

This tutorial assumes you are using Bitbucket for code hosting and version control management using Git.

Create a project

Once you've signed up for a new Launchdeck account, you can create your first project and link it to your Bitbucket account. All repositories within your account will be retrieved and shown as a list, from which you can now select the one you’d like to use. When creating the new project, Launchdeck will automatically add a webhook to your repository so that when you push new commits, they'll show up in Launchdeck automatically.

You can connect to a repository on any of the main hosting providers - Bitbucket, GitHub, GitLab or if you host a repository elsewhere you can configure it manually.

We offer a free full-featured plan that allows you to deploy one project as often as you’d like!

Setup your build

The next step allows us to define commands which will be executed in an isolated docker container - this is the build step. You can use this step to, for example, compile assets, install dependencies, run tests, and everything in between.

All files generated using these build commands will be uploaded to your server. You’ll find more information on how to set up and use build commands on our docs page about build automation.

Configure your FTP server

Now let’s tell Launchdeck where to deploy the files.

Pick ‘FTP’ as the server type and give it an easily recognizable name.

Enter your server’s hostname, and optionally the port if you wish to use a different port (the default ‘21’ is standard for the FTP protocol).

Enter the credentials to your server and the webroot path to which your files should be uploaded. Normally, this will be a directory like htdocs or public_html.

Deploy from git to ftp server

Please note that the webroot path is relative to the FTP user's home directory. So say the home directory of the FTP user is /domains/ and you want your project stored at /domains/, you should then set your webroot to /public_html.

To figure out whether the server connection data is correct, run the server connection test and we’ll try to connect to your server and check the provided path(s).

Deploy for the first time

We’re now ready to start our first deployment. Click ‘create new project’ to confirm the settings and add the project. In the project overview, you can now start the build. The code will be cloned from your Bitbucket repository and prepared for you to publish it. Hit ‘Publish’ and your code is live!

That’s all! By using Launchdeck to deploy, you’ll never have to manually upload a new version, or worry about forgetting a file again. Just hit “publish”, and Launchdeck will automatically upload all modified files to exactly the right place on your server.

Deploy from Bitbucket to ftp

A better way to deploy code

Get started for free

Free • Simple setup • Cancel any time

A better way to deploy code

Get started for free

Free • Simple setup • Cancel any time

A little bit about the author
Webdesigner and front-end developer. Marketing, UI, UX & SEO enthusiast. Likes to delete buttons, features and settings for a more intuitive design. Life motto: Less is more.