Skip to content

Instantly share code, notes, and snippets.

@sta1r
Last active January 3, 2020 12:10
Show Gist options
  • Select an option

  • Save sta1r/f80fdfb5a7e70931cdcfdaa16abaac3e to your computer and use it in GitHub Desktop.

Select an option

Save sta1r/f80fdfb5a7e70931cdcfdaa16abaac3e to your computer and use it in GitHub Desktop.
Configuration CLI commands for a Magento local development environment

Please note these are designed to remove hurdles when starting up or re-installing a local Magento environment, and are not for production use.

bin/magento deploy:mode:set developer
bin/magento config:set admin/captcha/enable 0
bin/magento config:set admin/security/session_lifetime 604800

Specific to dotdigital connector

Sync settings

bin/magento config:set sync_settings/sync/customer_enabled 1
bin/magento config:set sync_settings/sync/guest_enabled 1
bin/magento config:set sync_settings/sync/subscriber_enabled 1
bin/magento config:set sync_settings/sync/order_enabled 1
bin/magento config:set sync_settings/sync/wishlist_enabled 1
bin/magento config:set sync_settings/sync/review_enabled 1
bin/magento config:set sync_settings/sync/catalog_enabled 1

Remove IP restriction

bin/magento config:set connector_developer_settings/ip_restriction/ip_addresses 0

Abandoned cart and basket config

bin/magento config:set connector_configuration/abandoned_carts/email_capture 1
bin/magento config:set connector_configuration/abandoned_carts/easy_capture_newsletter 1

Subscription preferences

bin/magento config:set connector_configuration/customer_addressbook/show_preferences 1

dotdigital CLI shortcut command

Most of the above dotdigital-specific settings can be achieved via our CLI:

bin/magento dotdigital:connector:enable \
  --username=chaz@apiconnector.com \
  --password=chazword \
  --automap-datafields=1 \
  --enable-syncs=1 \
  --enable-email-capture=1 \
  --remove-ip-restriction=1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment