How to migrate (or upload) code to wordpress droplet

November 12, 2015 698 views
Deployment WordPress One-Click Install Apps

I've spun up a WP droplet on Ubuntu--easy. How do I actually get my code onto the server? From what I understand I can either upload it using Cyberduck (Filezilla isn't working for me--an outdated tutorial perhaps?), or push in from my Bitbucket repo, but I have found zero tutorials on this so far.

3 Answers

FileZilla works fine for uploading files to a droplet. You can also use scp directly.

If you are using a password for your root user (rather than ssh-keys) you can set up an SFTP connection in Cyberduck. I am on Linux myself so cannot check what names Cyberduck uses for specific fields but this should help:

server/host: Your droplet's IP
user: root
password: your root user's password

If there is an option for default directory you can set it to /var/www/html which is the web root. If you don't, you will start out in /root. From there you can change up a directory to / and navigate to /var/www/html and upload your files where you need to within the WordPress file structure.

@stockdizzle - For Filezilla, take a look here (I created a few screenshots to help you get things configured).

The first screenshot is of the Site Manager. The first box is where you'll enter your Droplet Public IP. The box directly to the right is the Port that the connection will attempt to open on. Below the first two boxes you'll find Protocol, which will allow you to select FTP or SFTP

Screenshot #01

  • The Host input box is where you'll enter your Droplet's Public IP Address.
  • The Port input box is where you'll enter the port used for the connection (see below).
  • The Protocol select box options are FTP or SFTP. Choose SFTP and set Port to 22.
  • The Username input box should be set to root unless you have created another user to login with (which is advised, you really shouldn't be logging in as root or using password authentication -- using an SSH Key with a pass code on top is the recommended method).
  • The Password input box should be filled with the root password sent to your e-mail address.

If you've already created an SSH Key or plan to, then screenshot #02 will help you to add that SSH Key to Filezilla so that it can be used to connect to your Droplet.


Screenshot #02

The Settings menu can be found under Edit -> Settings.

  • Click on SFTP from the left side menu tree.
  • Click on Add Key File
  • Choose your Private Key File and hit enter/return.

If the Private Key is not in PPK format (standard with SSH Keys generated by PuTTyGen -- link below), Filezilla may ask you if you want to convert -- click yes as Filezilla will only accept the Private Key in PPK format (Filezilla will handle the conversion for you).

Once the key is added, you'll see it in the list and you can click on the OK button to close out of the settings menu. At this point, you'll want to remove the password that was set when configuring your site in the Site Manager (simply select it all, hit delete - don't add any spaces). The Host, Port, Protocol and Username do not need to be modified.

You should, at this point, be able to hit enter and it'll ask you to authorize the connection -- do so. If you set a pass code on your Private Key, it'll then ask you for that and once confirmed, it'll connect.


From there, you'll simply need to navigate to the directory where your files are stored from the right side (the left side will be your local computer directories).

Have another answer? Share your knowledge.