当网站商品很多的时候,比如有几千件,我们刷新Magento的索引管理(Index Management)很慢,而且经常会失败。那么后台刷新不了,我们还可以通过命令行来刷新。使用命令行来刷新索引管理会极大降低系统消耗,容易成功。
登入你的ssh客户端,切换目录到你magento根文件夹中shell的文件中
执行下面命令
#php -f indexer.php -- -reindex catalog_url
它的意思是刷新Catalog Url Rewrites即网址重写。成功后会有成功提示,
提示:Catalog URL Rewrites index was rebuilt successfully
还有以下索引管理,可以使用Shell的命令行来刷新
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
命令执行后需要耐心等待一段时间,因你商品数量和你服务器性能决定等待多久。注意命令中reinde前一共是三个英文横线。
转载于:https://blog.51cto.com/bighuamao/797042