There are some common settings to change for dev sites at mycivi.localhost/civicrm/admin/setting/debug. How can those be changed from the command line?

A better answer for the question How should I copy a site from production to staging? would include this information I think.

I see on https://docs.civicrm.org/sysadmin/en/latest/misc/staging-production/ that $civicrm_setting['domain']['environment'] = 'Development'; can be placed in civicrm.settings.php, which I would expect would be sufficient(though it doesn't seem to affect what's displayed at /civicrm/admin/setting/debug)... but what about other settings like debugging and backtrace?

If I do drush vget I get a list of all kinds of Drupal settings that can be changed via drush vset. Does CiviCRM have a comparable utility? I tried cv and wondered if cv vars:show and cv vars:fill might be corresponding commands, but if they are I don't know how to use them to do anything useful.

1 Answer 1


You can use drush cv to update the settings in db.

eg drush cvapi Setting.create environment="Production"

You can find various options in API explorer to set other settings and see for command in cv and drush section.

enter image description here

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.