Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Magento 2 - Initialize development environment using n98-magerun2
function init_dev_env_mag2() {
n98mr2 deploy:mode:set developer
n98mr2 config:set dev/log/active 1
n98mr2 config:set dev/template/allow_symlink 1
n98mr2 config:set web/cookie/cookie_httponly 0
n98mr2 config:set web/cookie/cookie_path ""
n98mr2 config:set web/cookie/cookie_domain ""
n98mr2 config:set dev/js/merge_files 0
n98mr2 config:set dev/css/merge_files 0
n98mr2 config:set dev/css/merge_css_files 0
n98mr2 config:set admin/security/session_cookie_lifetime 7200
n98mr2 config:set google/analytics/active 0
n98mr2 config:set google/analytics/account ""
n98mr2 cache:clean
n98mr2 cache:enable
n98mr2 admin:user:delete --force ${MAGENTO_LOCAL_ADMIN_USERNAME}
n98mr2 admin:user:create --admin-user="${MAGENTO_LOCAL_ADMIN_USERNAME}" --admin-password="${MAGENTO_LOCAL_ADMIN_PWD}" --admin-email="${MAGENTO_LOCAL_ADMIN_EMAIL}" --admin-firstname="${MAGENTO_LOCAL_ADMIN_FIRSTNAME}" --admin-lastname="${MAGENTO_LOCAL_ADMIN_LASTNAME}"
bin/magento dev:urn-catalog:generate .idea/misc.xml
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.