• 手动刷新magento的索引管理方法


    当我们网站商品很多的时候,比如有几千件,我们刷新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自带的脚本运行,这个脚本的位置在shellindexer.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  

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

           

  • 相关阅读:
    [高并发]Java高并发编程系列开山篇--线程实现
    [版本控制之道] Git 常用的命令总结(欢迎收藏备用)
    【微框架】之一:从零开始,轻松搞定SpringCloud微服务系列--开山篇(spring boot 小demo)
    【微框架】Maven +SpringBoot 集成 阿里大鱼 短信接口详解与Demo
    [转]利用URLConnection来发送POST和GET请求
    【接口开发】浅谈 SOAP Webserver 与 Restful Webserver 区别
    【SSM框架】Spring + Springmvc + Mybatis 基本框架搭建集成教程
    【解决方案】Myeclipse 10 安装 GIT 插件 集成 步骤 图解
    Mac系统上iTerm2+zsh样式优化
    CentOS 安装XMPP服务器
  • 原文地址:https://www.cnblogs.com/focai/p/4693767.html
Copyright © 2020-2023  润新知