How to download Craft CMS logs using SSH and Terminal

Oscar de la Hera Gomez
Two flowers representing Craft CMS and Terminal. Beneath them sits the text "Download Logs on a Hosted Craft CMS."<br />

A step by step guide on downloading logs from a Craft CMS hosted on Fortrabbit using SSH and Terminal.

Step One: SSH into the server

A screenshot of Terminal showing what the terminal looks like after you have successfully accessed a hosted craft cms using SSH on Fortrabbit.

Follow the tutorial below to learn how to SSH into the server.

Step Two: Determine the Logs you want to Download

A screenshot of Terminal showing the logs that are available when running the command found below.

Set the current directory to storage/logs and run the ls command to list the logs that are available.

cd storage/logs; ls

Take a note of the the name of the log file that you wish to download.

Step Three: Download the File

A screenshot of Terminal showing how it asks for your password after you attempt to download a file using the command below.

Open a new terminal window and type in a command similar to the one below.

Replace username@host with the username@host that you used to SSH into your server in Step One and path/on/your/computer is the path where you wish the file to be downloaded to.

scp username@host:storage/logs/log.file path/on/your/computer

You will be prompted to enter a password, use the same one that you used to SSH in.

After you enter your password, the terminal will transition to a visual similar to that below which will inform you of the progress made as you download the file.

A screenshot of Terminal showing you what Terminal looks like when a file is being downloaded.

Any Questions?

We are actively looking for feedback on how to improve this resource. Please send us a note to inquiries@delasign.com with any thoughts or feedback you may have.
delasign logo

Book a Free Consultation.

An icon of an email.

Click here to email us.

Fill in the details below to book a free consultation or to let us know about something else. Whatever it is, we are here to help.

How can we help you ?

Contact Details