I'm trying to reindexing my Magento 2 I have done these steps in putty
can anyone tell me what did I do wrong? I'm new in using SSH that's why
thank you so much.
You need to write:
cd public_html/magedemo instead of cd /public_html/magedemo
You will then be in the root directory of your installation and bin/magento commands will hopefully work.
To check whether you are running the commands from the right place or not, you can do the following:
Step 1: Create/upload a file (say: info.php) and put the following content in the file:
<?php
phpinfo();
?>
and open the following URL in the browser:
http://[websiteurl]/info.php
Step 2: Note down the path mentioned under the heading
document_root.
Step 3: Run the following command to change the directory:
cd [the-path-noted-in-step-2-as-document_root]
Step 4: Now try to run any Magento 2 command from this location. If still, you are getting the same error, please comment or update the question.