WordPress on Amazon EC2: Connect to an Instance via FTP

This is part of my Introduction to Hosting WordPress on Amazon Web Services (AWS) tutorial.

In this tutorial we are going to go over the steps needed to access youur WordPress files by connecting to an Amazon Web Services (AWS) EC2 instance over FTP (or, more accurately, SFTP) using an FTP client. In my case I am using Cyberduck, an FTP client for macOS. I will also need the address and login credentials for the server I am trying to connect to, including the private key needed to authenticate an SSH connection with the server.

  1. Open Cyberduck from the Applications folder.
  2. Click the Open Connection icon in the top-left corner of the Cyberduck browser.
  3. Click the drop-down at the top of the pop-up. (It should default to FTP (File Transfer Protocol).
  4. Select SFTP (SSH File Transfer Protocol) from the drop-down menu.
  5. In the Server field, enter the IPv4 address for your EC2 instance. For example: ec2-12-345-678-90.us-east-2.compute.amazonaws.com. (the actual address of your own EC2 Instance will differ based on its IP address and availability zone).

    • You can get the IP address for your EC2 instance from the Public DNS (IPv4) field under the Descriptions tab for your instance on the EC2 Dashboard.
  6. Enter the Username from your login credentials. I am connecting to a WordPress Certified by Bitnami Amazon Machine Image (AMI), and, through research, I know that the Username is bitnami.
  7. There is no password. Click the drop-down for SSH Private Key and select Choose….
  8. Navigate to the directory where you are storing your private key and select the correct private key that will allow access to the server.
  9. Click Connect.
  10. If this is the first time connecting to the server, you will see an Unknown fingerprint pop-up window. Check the Always box and click Allow. (If you do want to check the fingerprint info, you can find it by looking through your EC2 Instance’s System Log from the EC2 Dashboard.)
  11. Now that you have connected, you will see from the address bar at the top of the browser that you are in the bitnami directory (/home/bitnami). It took me some exploration when I was starting out, but I happen to know that the WordPress installation I am looking for is in apps.
  12. To find the WordPress installation directory for a WordPress Certified by Bitnami AMI, navigate through apps to wordpress, and through wordpress to htdocs.
  13. Double-click htdocs to open it.
  14. Users with some WordPress experience will recognize the file and directory names in htdocs as the top level of a WordPress installation.