{"id":16367,"date":"2019-11-08T09:42:28","date_gmt":"2019-11-08T14:42:28","guid":{"rendered":"https:\/\/bangla.salearningschool.com\/recent-posts\/reindex-magento-data-using-php-shell-and-command-line\/"},"modified":"2019-12-06T14:02:38","modified_gmt":"2019-12-06T19:02:38","slug":"reindex-magento-data-using-php-shell-and-command-line","status":"publish","type":"post","link":"http:\/\/bangla.sitestree.com\/?p=16367","title":{"rendered":"Reindex magento data using PHP (Shell) and Command Line"},"content":{"rendered":"<p>You can go to the shell folder, and run the following to reindex everything<\/p>\n<p>php indexer.php &#8211;reindexall<\/p>\n<p><strong>Magento 2 has similar command line features.<\/strong><\/p>\n<p>php bin\/magento indexer:reindex<\/p>\n<p>&#8212;<br \/>\n<strong>To reindex individually<\/strong><\/p>\n<p>php yourmagentofolder\/shell\/indexer.php -reindex catalog_product_attribute<br \/>\nphp yourmagentofolder\/shell\/indexer.php -reindex catalogsearch_fulltext<br \/>\nphp yourmagentofolder\/shell\/indexer.php -reindex catalog_category_flat<br \/>\nphp yourmagentofolder\/shell\/indexer.php -reindex cataloginventory_stock<br \/>\nphp yourmagentofolder\/shell\/indexer.php -reindex catalog_category_product php yourmagentofolder\/shell\/indexer.php -reindex catalog_product_price<br \/>\nphp yourmagentofolder\/shell\/indexer.php -reindex tag_summary<br \/>\nphp yourmagentofolder\/shell\/indexer.php -reindex catalog_url<\/p>\n<p><strong>Reference:<\/strong><a href=\"https:\/\/magento.stackexchange.com\/questions\/162166\/how-to-reindex-magento-1-x-by-using-command-line\">https:\/\/magento.stackexchange.com\/questions\/162166\/how-to-reindex-magento-1-x-by-using-command-line<\/a><br \/>\nSure, I also executed these\/similar myself&#8230;<\/p>\n<p>&#8212;<\/p>\n<p><em><strong>Sayed Ahmed<\/strong><br \/>\n<\/em><\/p>\n<p><em><strong>Linkedin<\/strong>: <a href=\"https:\/\/ca.linkedin.com\/in\/sayedjustetc\">https:\/\/ca.linkedin.com\/in\/sayedjustetc<\/a><br \/>\n<\/em><\/p>\n<p><em><strong>Blog<\/strong>: <a href=\"http:\/\/bangla.salearningschool.com\/\">http:\/\/Bangla.SaLearningSchool.com<\/a>, <a href=\"http:\/\/sitestree.com\">http:\/\/SitesTree.com<\/a> <\/em><br \/>\n<em><strong>Online and Offline Training<\/strong>: <a href=\"http:\/\/training.SitesTree.com\">http:\/\/Training.SitesTree.com<\/a> <\/em><\/p>\n<p><em><strong>I<\/strong>f you want to contribute to the operation of this site including occasional free online training (using Skype, Zoom.us): <a href=\"http:\/\/training.sitestree.com\/\">http:\/\/Training.SitesTree.com<\/a> (or charitable\/non-profit work in the education sector), you can financially contribute to: safoundation at <a href=\"http:\/\/salearningschool.com\">salearningschool.com<\/a> using Paypal. Sometime, we also provide <\/em><br \/>\n<strong><\/strong><br \/>\n<strong><em>Affiliate Links:<\/em><\/strong><br \/>\n<em>Hottest Deals on Amazon USA: <a href=\"http:\/\/tiny.cc\/38lddz\">http:\/\/tiny.cc\/38lddz<\/a><br \/>\n<\/em><br \/>\n<em>Hottest Deals on Amazon CA: <a href=\"http:\/\/tiny.cc\/bgnddz\">http:\/\/tiny.cc\/bgnddz<\/a><br \/>\n<\/em><br \/>\n<em>Hottest Deals on Amazon Europe: <a href=\"http:\/\/tiny.cc\/w4nddz\">http:\/\/tiny.cc\/w4nddz<\/a><\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>You can go to the shell folder, and run the following to reindex everything php indexer.php &#8211;reindexall Magento 2 has similar command line features. php bin\/magento indexer:reindex &#8212; To reindex individually php yourmagentofolder\/shell\/indexer.php -reindex catalog_product_attribute php yourmagentofolder\/shell\/indexer.php -reindex catalogsearch_fulltext php yourmagentofolder\/shell\/indexer.php -reindex catalog_category_flat php yourmagentofolder\/shell\/indexer.php -reindex cataloginventory_stock php yourmagentofolder\/shell\/indexer.php -reindex catalog_category_product php yourmagentofolder\/shell\/indexer.php -reindex catalog_product_price &hellip; <\/p>\n<p><a class=\"more-link btn\" href=\"http:\/\/bangla.sitestree.com\/?p=16367\">Continue reading<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1907,182],"tags":[],"class_list":["post-16367","post","type-post","status-publish","format-standard","hentry","category-magento-2","category---blog","item-wrap"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":26239,"url":"http:\/\/bangla.sitestree.com\/?p=26239","url_meta":{"origin":16367,"position":0},"title":"Reindex Magento data using PHP (Shell) and Command Line #Root","author":"Author-Check- Article-or-Video","date":"April 20, 2021","format":false,"excerpt":"You can go to the shell folder, and run the following to reindex everything php indexer.php --reindexall Magento 2 has similar command line features. php bin\/magento indexer:reindex --- To reindex individually php yourmagentofolder\/shell\/indexer.php -reindex catalog_product_attribute php yourmagentofolder\/shell\/indexer.php -reindex catalogsearch_fulltext php yourmagentofolder\/shell\/indexer.php -reindex catalog_category_flat php yourmagentofolder\/shell\/indexer.php -reindex cataloginventory_stock php yourmagentofolder\/shell\/indexer.php -reindex\u2026","rel":"","context":"In &quot;FromSitesTree.com&quot;","block_context":{"text":"FromSitesTree.com","link":"http:\/\/bangla.sitestree.com\/?cat=1917"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":17034,"url":"http:\/\/bangla.sitestree.com\/?p=17034","url_meta":{"origin":16367,"position":1},"title":"All About Magento 2: Indexing\/reindexing","author":"Sayed","date":"May 4, 2020","format":false,"excerpt":"[Do not forget to search this site to learn\/find related information] # Use reset to reset current indexing status # You may not need to use this all the time # You will need to use this when you see invalid indexing status or you see index locked; # When\u2026","rel":"","context":"In &quot;\u09ac\u09cd\u09b2\u0997 \u0964 Blog&quot;","block_context":{"text":"\u09ac\u09cd\u09b2\u0997 \u0964 Blog","link":"http:\/\/bangla.sitestree.com\/?cat=182"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/bangla.salearningschool.com\/wp-content\/uploads\/2020\/05\/Screen-Shot-2020-05-03-at-3.43.03-PM.png?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/bangla.salearningschool.com\/wp-content\/uploads\/2020\/05\/Screen-Shot-2020-05-03-at-3.43.03-PM.png?resize=350%2C200 1x, https:\/\/i0.wp.com\/bangla.salearningschool.com\/wp-content\/uploads\/2020\/05\/Screen-Shot-2020-05-03-at-3.43.03-PM.png?resize=525%2C300 1.5x, https:\/\/i0.wp.com\/bangla.salearningschool.com\/wp-content\/uploads\/2020\/05\/Screen-Shot-2020-05-03-at-3.43.03-PM.png?resize=700%2C400 2x"},"classes":[]},{"id":16497,"url":"http:\/\/bangla.sitestree.com\/?p=16497","url_meta":{"origin":16367,"position":2},"title":"Magento 2: Reset indexes","author":"Sayed","date":"December 9, 2019","format":false,"excerpt":"Reset indexes if index reindexing causes issues. All possible combinations for native indexes: \" bin\/magento indexer:reset design_config_grid; bin\/magento indexer:reset customer_grid; bin\/magento indexer:reset catalog_category_product; bin\/magento indexer:reset catalog_product_category; bin\/magento indexer:reset catalogrule_rule; bin\/magento indexer:reset catalog_product_attribute; bin\/magento indexer:reset cataloginventory_stock; bin\/magento indexer:reset catalog_product_price; bin\/magento indexer:reset catalogrule_product; bin\/magento indexer:reset catalogsearch_fulltext; Reference:https:\/\/mirasvit.com\/knowledge-base\/magento-2-reindex-error-locked.html","rel":"","context":"In &quot;\u09ac\u09cd\u09b2\u0997 \u0964 Blog&quot;","block_context":{"text":"\u09ac\u09cd\u09b2\u0997 \u0964 Blog","link":"http:\/\/bangla.sitestree.com\/?cat=182"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":76369,"url":"http:\/\/bangla.sitestree.com\/?p=76369","url_meta":{"origin":16367,"position":3},"title":"Solution that worked for the issue: Your current session has been expired. for Magento2","author":"sayedjustetc","date":"November 17, 2024","format":false,"excerpt":"Solution that worked for the issue: Your current session has been expired. for Magento2 cat shell-scripts\/temp.sh# fix misc issues, can be routine sudo php bin\/magento maintenance:enable#sudo rm -rf var\/cache\/#sudo rm -rf generated\/sudo chmod +x bin\/magentosudo php bin\/magento setup:upgrade#sudo php bin\/magento setup:static-content:deploy -fsudo php bin\/magento setup:di:compilesudo php bin\/magento indexer:reindexsudo php bin\/magento\u2026","rel":"","context":"In &quot;Root&quot;","block_context":{"text":"Root","link":"http:\/\/bangla.sitestree.com\/?cat=1"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":15984,"url":"http:\/\/bangla.sitestree.com\/?p=15984","url_meta":{"origin":16367,"position":4},"title":"Upgrade magento from 2.3.1 to 2.3.2","author":"Sayed","date":"August 19, 2019","format":false,"excerpt":"Upgrade Magento from 2.3.1 to 2.3.2 From 2.3.0 to 2.3.2 should also work; from some other earlier versions may or may not work.. A very similar approach worked for me (Note: I have no interest to work in the industry with Magento). Also, after upgrade, check the error log and\/or\u2026","rel":"","context":"In &quot;Magento 2&quot;","block_context":{"text":"Magento 2","link":"http:\/\/bangla.sitestree.com\/?cat=1907"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":14846,"url":"http:\/\/bangla.sitestree.com\/?p=14846","url_meta":{"origin":16367,"position":5},"title":"Learn some CentOS Linux : Redhat Linux","author":"Sayed","date":"June 29, 2019","format":false,"excerpt":"This is mostly about Centos Linux. However, this also shows commands related to how to install Magento 2 on LEMP (E for Nginx Web-server). Some PHP related stuff are there as well. LEMP + CentOS + Magento 2 : VM Image or one click install: I did not see readily\u2026","rel":"","context":"In &quot;Magento 2&quot;","block_context":{"text":"Magento 2","link":"http:\/\/bangla.sitestree.com\/?cat=1907"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/16367","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=16367"}],"version-history":[{"count":1,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/16367\/revisions"}],"predecessor-version":[{"id":16481,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/16367\/revisions\/16481"}],"wp:attachment":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=16367"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=16367"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=16367"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}