How to force a hosted Craft CMS to perform garbage collection

Oscar de la Hera Gomez
A flower that represents Craft CMS. Beneath it sits the text "Force Garbage Collection."

SSH into the hosted Craft CMS and run php craft gc.

Step One: SSH into the hosted Craft CMS

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 a Craft CMS hosted on Fortrabbit.

Step Two: Force Garbage Collection

A screenshot of Terminal showing you what happens when you force garbage collection on a hosted Craft CMS.

Run the following line:

php craft gc

You can also force hard-deletion for all soft-deleted rows with the delete-all-trashed option:

php craft gc --delete-all-trashed=1

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