Is there any way to migrate the configuration of a Sprout Form between my local environment and the production environment?

I'm on Craft 3.

Ideally, I'd love to generate a migration using the migration manager https://github.com/Firstborn/Craft-CMS-Migration-Manager but would love any way to move the settings of a form.

1 Answer 1


Sprout Forms will be adding support for Project Config in Craft 3.1. At the time of this posting the Craft Project Config has not yet been released, the Project Config will likely give us a much better workflow to maintain plugin settings between environments.

While there is an alternative, the export/import path described below would be a bit tedious to maintain and could just be easier to do manually depending on how many Forms you need to migrate (as you will have to define those forms in the export JSON to get them exported).

Sprout Forms has a Sprout Import integration and supports importing Form and Form Entry Elements via the Sprout Import Element Importer API.

With the Sprout Forms/Sprout Import integration you could:

  1. Create a Twig template or script that outputs your Forms (and/or Entries) to a JSON file
  2. Create a Migration that grabs that JSON export and hands it off to Sprout Import to import.

This import can be triggered using the Sprout Import service layer or via a console command.

./craft sprout/import/run --file="@root/import.json"

More on importing forms using this API: https://sprout.barrelstrengthdesign.com/docs/forms/importing-data.html#forms

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.