Skip to content

Instantly share code, notes, and snippets.

@ivanrvpereira
Forked from ho-nl/clear_cache.sh
Created July 10, 2012 13:34
Show Gist options
  • Save ivanrvpereira/3083275 to your computer and use it in GitHub Desktop.
Save ivanrvpereira/3083275 to your computer and use it in GitHub Desktop.
echo $(date +"%d.%b %H:%M:%S") empty cache directory, so we have optimal importperformance.
rm -rf /path/to/magento/var/cache/
#Do some other things to generate the CSV files, download images, etc.
echo Change index mode to \"Manual Update\"
php /path/to/magento/shell/indexer.php --mode-manual catalog_product_attribute
php /path/to/magento/shell/indexer.php --mode-manual catalog_product_price
php /path/to/magento/shell/indexer.php --mode-manual catalog_url
php /path/to/magento/shell/indexer.php --mode-manual catalog_product_flat
php /path/to/magento/shell/indexer.php --mode-manual catalog_category_flat
php /path/to/magento/shell/indexer.php --mode-manual catalog_category_product
php /path/to/magento/shell/indexer.php --mode-manual catalogsearch_fulltext
php /path/to/magento/shell/indexer.php --mode-manual cataloginventory_stock
echo mag_product_import.php 7
php /path/to/magento/dataflow/shell/mag_product_import.php 7
echo indexer.php reindexall
php /path/to/magento/shell/indexer.php reindexall
echo Change index mode to \"Update on Save\"
php /path/to/magento/shell/indexer.php --mode-realtime catalog_product_attribute
php /path/to/magento/shell/indexer.php --mode-realtime catalog_product_price
php /path/to/magento/shell/indexer.php --mode-realtime catalog_url
php /path/to/magento/shell/indexer.php --mode-realtime catalog_product_flat
php /path/to/magento/shell/indexer.php --mode-realtime catalog_category_flat
php /path/to/magento/shell/indexer.php --mode-realtime catalog_category_product
php /path/to/magento/shell/indexer.php --mode-realtime catalogsearch_fulltext
php /path/to/magento/shell/indexer.php --mode-realtime cataloginventory_stock
echo DONE
php /path/to/magento/shell/indexer.php --mode-manual catalog_product_attribute
php /path/to/magento/shell/indexer.php --mode-realtime catalog_product_attribute
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment