Run MagentoCode Outside Of Magento

Often in magento development process, we come across the stitaution to use Magento functions and classes outside of the Magento platform. This can be easily achieved with the following ways

1) Php shell Script

2) Magento shell script

PHP Shell Scirpt


Magento shell script

Now the second way of writing the scripts, if you take a look in to the path magento_root/shell you can find few scirpts that are already built by magento. Take a look at indexer.php this script can be used to re-index magento from commmand land.

For example you can  execute indexer.php in below way

To check the status of all Indexes

php indexer.php –status

To Reindex all indexes

php indexer.php –reindexall

To Reindex particular index

php indexer.php –[Index Option Code]

Now Lets write our own script


Leave a Reply

Your email address will not be published. Required fields are marked *