We try to delete the submissions from Freeform with the following terminal command: ./craft freeform/purge/submissions --age-in-days=30

And we get this error:

Craft can’t connect to the database. Check your connection settings.    

Unknown command: freeform/purge/submissions
Caused by: Exception 'yii\base\InvalidRouteException' with message 'Unable to resolve the request "freeform/purge/submissions".'

Plugin-Info: Freeform Plugin Version: 4.0.8 (lite, not pro)

Does anyone have a tip on how we can solve this?

2 Answers 2


I think we solved it:

It's a Freeform Pro feature, not available in Freeform Lite :)

  • Can you add more detail to your answer? This isn't very helpful for someone having the same issue. Commented Mar 30, 2023 at 20:17

Your error message indicates that Craft CMS is unable to connect to the database and that the terminal command is not recognized.

You can resolve this issue by using this

  1. Check your database connection settings in the Craft CMS control panel. Go to "Settings" -> "Database" and make sure the connection settings are correct.
  2. Verify that your Craft CMS installation is running properly by accessing the control panel and checking for any error messages.
  3. Make sure that the Freeform plugin is installed and enabled in Craft CMS. You can check this by going to "Settings" -> `"Plugins" in the control panel.
  4. Check the Freeform plugin documentation to ensure that the command you are trying to use is valid for the version of Freeform you have installed. It's possible that the command has changed or is not available in the Lite version of the plugin.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.