How to re-index from PHP command line using SSH Print

  • 0

The most efficient way to run the reindexing through command line using SSH.

  1. Log in to your server or hosting account via SSH, change to the magento user.
  2. Navigate to /public_html/shell/ folder
  3. Check the status of the indexes to see what needs reindexing
    php indexer.php --status
  4. To reindex all
    php indexer.php --reindexall
  5. Or, find the key names of each index and reindex only the items requiring a reindex
    php indexer.php --info
  6. Running the above will give you a list as follows:
    catalog_product_attribute
    Product Attributes
    catalog_product_price
    Product Prices
    catalog_url
    Catalog URL Rewrites
    catalog_product_flat
    Product Flat Data
    catalog_category_flat
    Category Flat Data
    catalog_category_product
    Category Products
    catalogsearch_fulltext
    Catalog Search Index
    cataloginventory_stock
    Stock Status
    tag_summary
    Tag Aggregation Data
  7. Now choose the key names that require reindexing and run, seperating with a comma if more than one
    php indexer.php --reindex key_name_here
  8. As an example, if we need to reindex catalog_product_flat and catalog_category_product we would choose
    php indexer.php --reindex catalog_product_flat,catalog_category_product
  9. Now we wait until completion 

Was this answer helpful?

« Back