当我们网站商品很多的时候,比如有几千件,我们刷新Magento的索引管理(Index Management)经常会失败。那么后台刷新不了,我们还可以通过命令行来刷新。

使用命令行来刷新索引管理会极大降低系统消耗,容易成功。

我们来看下步骤,如果你在使用linux服务器,登入你的ssh客户端,切换目录到你magento根文件夹中名字是shell的文件中。(切换文件夹的命令:cd)
        在此文件夹中输入如下命令

        php -f indexer.php -- -reindex catalog_url

它的意思是刷新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_summary

其它扩展:

        在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

但实际发现这个命令是没法运行的。

最新文章

  1. win10下安装mysql5.7.16(解压缩版)
  2. web开发字符乱码问题
  3. MD5 加密 java代码实现
  4. springmvc 中RequestMapping注解的使用
  5. 第二百三十一天 how can I 坚持
  6. ccr1
  7. c#equals相关
  8. 南京Uber优步司机奖励政策(1月25日~1月31日)
  9. clang: error: unable to execute command: Segmentation fault: 11
  10. Centos 7 python升级(2.7.5-》2.7.11)
  11. HTML知识点摘记
  12. Oracle Tablespace Transportation
  13. C语言 cgi(3)
  14. 10- python 网络爬虫分析
  15. 《安卓网络编程》之第七篇 java编写Service程序
  16. 《剑指Offer》面试题5-替换空格
  17. adb devices找不到设备解决办法
  18. [OpenCV] GpuMat and Mat, compare cvtColor perforemence
  19. python with as的用法
  20. 【AI】神经网络基本词汇

热门文章

  1. thinkjs——session
  2. pandas筛选0,3,6开头的行
  3. Nginx+php+fastcgi在win7下的配置
  4. Kettle6.0安装及问题总结-白痴教程
  5. 项目导入myeclipse10后jsp报错问题
  6. 更新证书错误:No matching provisioning profiles found
  7. https://developers.google.com/maps/documentation/javascript/examples/places-autocomplete-addressform
  8. [vijos P1040] 高精度乘法
  9. SQL Server 检测到基于一致性的逻辑 I/O 错误 校验和不正确 ||尝试在数据库 5 中提取逻辑页 (1:1640) 失败
  10. asp.net中关于Microsoft 信息完整性、隐私性等集成信息安全服务服务 integrated security=SSPI