手動刷新magento的索引管理方法

當咱們網站商品不少的時候,好比有幾千件,咱們刷新Magento的索引管理(Index Management)常常會失敗。那麼後臺刷新不了,咱們還能夠經過命令行來刷新。php

        使用命令行來刷新索引管理會極大下降系統消耗,容易成功。linux

咱們來看下步驟,若是你在使用linux服務器,登入你的ssh客戶端,切換目錄到你magento根文件夾中名字是shell的文件中。(切換文件夾的命令:cd)
        在此文件夾中輸入以下命令

        php -f indexer.php -- -reindex catalog_urlshell

 它的意思是刷新Catalog Url Rewrites即網址重寫。成功後會有成功提示,如:Catalog URL Rewrites index was rebuilt successfully

        使用命令

        php -f indexer.php help 

        能夠獲得有關命令的使用幫助,具體參數用法能夠參照幫助實踐。

        具體命令以下:

        php -f indexer.php -- -reindex catalog_product_attribute
        php -f indexer.php -- -reindex catalog_product_price
        php -f indexer.php -- -reindex catalog_url
        php -f indexer.php -- -reindex catalog_product_flat
        php -f indexer.php -- -reindex catalog_category_flat//不是常常刷新
        php -f indexer.php -- -reindex catalog_category_product
        php -f indexer.php -- -reindex catalogsearch_fulltext
        php -f indexer.php -- -reindex cataloginventory_stock服務器

        php -f indexer.php -- -reindex tag_summaryssh

其它擴展:網站

        在magento中,reindex是常常須要使用的功能, 這個功能除了可在後臺直接使用外,還能經過一個magento自帶的腳本運行,這個腳本的位置在shell\indexer.php。

        腳本的三個經常使用選項以下:

        (1)查看哪些選項能夠reindex


            php indexer.php info  



        第一項是參數值,第二項是這個值的解釋(也就和在後臺上看到的同樣)


        (2)reindex 所有選項


            php indexer.php reindexall  


        (3)reindex 其中的某一項

            php indexer.php --reindex cataloginventory_stock  

        參數值可經過(1)查得

        注意了,在reindex.php 的幫助中提示命令的格式應該以下:

            php -f indexer.php --reindex cataloginventory_stock  

        但實際發現這個命令是無法運行的。ui

相關文章
相關標籤/搜索