ftp files with terminal Mac OSX

1. Connect to server

Get terminal into ftp mode by typing

Connect to your server

Username

Password

Type or paste-in your ftp password.
The password will be invisible.
Press Enter.

2. Select destination folder on server

Print your current location on the server using

Ftp terminal will probably respond with “Remote Directory: /” Which means you are in the root directory of the server.

It will list the files and folders of the directory you are currently in on the server.
Navigate to the folder you wish to upload to by typing

Changing “public_html/mysite/mysitefolder” to your destination folder path on the server.

3. Select folder from the local computer

Typing the “lcd” function without any file path will take you to the root directory of your local machine. eg: /users/yourname/

to change your local current directory to the “htdocs” directory folder. Case sensitivety applies.
Escape spaces in file names with “\” eg:

4. Upload using the put command

Proving “page.php” was in the directory on the local side. “Page.php” will now be on the server in the directory you specified.
Or zip/compress multiple files to upload.

Abort

You can abort a stalled upload with “control c”

Permission denied error

If this happens. You do not have write access to the folder on the server. However, you can change the permissions in most cases.

5. Exit out of ftp mode

Comments are closed.