Skip to content

Instantly share code, notes, and snippets.

@niclashoyer
Created June 16, 2012 16:51
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save niclashoyer/2941918 to your computer and use it in GitHub Desktop.
Save niclashoyer/2941918 to your computer and use it in GitHub Desktop.
Get Magento Configurations as XML
<?php
/*
Put this file to /magento/shell/config.php and run
$ php shell/config.php | tidy -xml -i > config.xml
*/
require_once 'abstract.php';
class Export_Config extends Mage_Shell_Abstract
{
public function run()
{
$config = new Mage_Core_Model_Config();
$config = $config->loadBase();
$config = $config->loadModules();
$config = $config->loadDb();
echo "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n";
echo $config->getXmlString()."\n";
}
}
$shell = new Export_Config();
$shell->run();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment