Magento 2 – How to Resolve setup:static-content:deploy Issues

magento2

Complete noob here, I've installed magento locally to learn more about it, and try to build an ecommerce site. I've succesfully installed it with xampp and composer, however I get no images displayed, and when attempting to click on menu items it does nothing. Everywhere says run this command:

bin/magento setup:static-content:deploy

So I put this at the end of the url of localhost/magento2. So it's localhost/magento2bin/magento setup:static-content:deploy and hit go. I get a 403 code Access forbidden

Is there somewhere I should be running this command specifically? How do I do that? Or how do I fix the 403 error? I've done some searching, but can't seem to find the answer to my problem

Best Answer

Everywhere says run this command: bin/magento setup:static-content:deploy

As you said, people say run that command: bin/magento setup:static-content:deploy

So if you are using Linux/UNIX OS-based, then open your Terminal or alternative application which always packed inside your OS. Then type

cd /absolute/path/to/your/magento/folder
php bin/magento setup:static-content:deploy

If you are using Windows, then make sure you added PHP executable file to your Environment Path, after that open up your Windows Command Prompt (cmd) and:

cd /absolute/path/to/your/magento/folder
php bin/magento setup:static-content:deploy

Finally, remember that Google is your friend.