Skip to content

Instantly share code, notes, and snippets.

@greenwellness
Created April 25, 2014 18:13
Show Gist options
  • Select an option

  • Save greenwellness/11298419 to your computer and use it in GitHub Desktop.

Select an option

Save greenwellness/11298419 to your computer and use it in GitHub Desktop.
Mage standalone scripts
<?php
define('PATH_TO_MAGENTO', '/var/www/magento'); // update accordingly
require_once PATH_TO_MAGENTO.'/app/Mage.php';
Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);
// your php code here
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment