0

I have seen some tutorials on re-indexing magento. with command line , shell, ssh. But i'm not very good with magento. I want some explanation on re-indexing through shell>indexer.php.(how to execute a command). I will be very grateful to you if you explain me this tutorial.(This tutorial) Thanks.

arushi
  • 404
  • 5
  • 15
Sandro
  • 59
  • 1
  • 1
  • 7

1 Answers1

0
Well the tutorial itself explains everything, still let me try if I can help:-

Indexing works fast when executed via shell and we need not to wait on browser.
To execute command first you need to reach via shell folder then you can execute all the below suggested command.

You need to simply mention 
php  indexer.php --reindex NameOFIndexer.
Example:- to index attributes of product(php indexer.php --reindex catalog_product_attribute)

Name of Indexer is the list you must be seeing in admin panel,here it 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

To get the list of all indexers you can write following on cmd:-
php indexer.php info

Apart from above method you can tell Magento to reindex all the indexer in a single go by following command:-
php indexer.php --reindexall

arushi
  • 404
  • 5
  • 15
  • First of all thank you so much for your time miss Arushi. But i want to know that how to execute a command. I wan born in Italy so may be that's why i'm not understanding the mean of execute. As you have wrote i need to mention this (php indexer.php --reindex catalog_product_attribute) but where? In this folder (indexer.php) Where i have to put this command. Thanks again for your time. – Sandro May 27 '16 at 16:36
  • Your answer will be very helpful for me. – Sandro May 27 '16 at 16:53
  • Where is your application running on live server or on your local environment. If on local environment then do it with command prompt and if it is on server then do it with putty(via SSH). Let me know which one are you using to help you further. – arushi May 27 '16 at 16:55
  • Thanks for your time. Yes, that website in on server. (via SSH) i should install any software on windows? or i can do it with cpanel? – Sandro May 28 '16 at 16:06
  • You can setup putty that will help you to access the website via SSH. You have to provide the hostname, usename and password. Then reach to the path where your application is located. there you can execute this command. – arushi May 30 '16 at 11:26
  • Thanks again, So now i understand the first tutorial was for local server. I was wondering that how i can run commands in cpanel....One more question now i'm doing as they have explained in this tutorial :: https://www.siteground.com/tutorials/ssh/putty.htm :: But at the 10th image they have wrote that port:18765(for siteground server) So for the cpanel server what i should put in port: – Sandro May 31 '16 at 13:14
  • Normally we keep port 22, can you try it with this. – arushi May 31 '16 at 13:37
  • Ok finally i have logged in via ssh/putty to the website, then cd public_html after this i'm putting those commands but nothing happens ,got an error that could not find indexer.php. So i just took a look on public_html folder in cpanel there is no folder named indexer.php but php.index and php.index.sample. I'm sorry if i'm wasting your time :) . – Sandro Jun 01 '16 at 10:58
  • I cannot help in this, every server has different path where code is placed. If you know the path of your server where your application is placed then only you can do it. Or in ssh execute several command. If you can tell me which OS you have ex, centos. then May be i can help. OR locate the file indexer.php. You can search for a particular file in SSH by using commands on basis of your OS. – arushi Jun 01 '16 at 12:24
  • Finally Its done. Now i'm running commands for re-index. Thank you so much arushi. :) – Sandro Jun 03 '16 at 11:18