Skip to content

Instantly share code, notes, and snippets.

@andkirby
Last active October 2, 2020 14:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andkirby/6675e676462899d46f3a1ec478af6aff to your computer and use it in GitHub Desktop.
Save andkirby/6675e676462899d46f3a1ec478af6aff to your computer and use it in GitHub Desktop.
Remove added data after `magento app:config:dump`
php -r '$config = require "app/etc/config.php"; \
$config = ["modules" => $config["modules"]]; \
echo "<?php\nreturn "; var_export($config); \
echo ";";' \
> app/etc/config.php.cleaned && mv app/etc/config.php.cleaned app/etc/config.php
php -r '$config = require "app/etc/env.php"; \
unset($config["system"]); \
echo "<?php\nreturn "; \
var_export($config); \
echo ";";' \
> app/etc/env.php.cleaned && mv app/etc/env.php.cleaned app/etc/env.php
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment