I am setting up a new Magento 2 store on AWS.

After installed M2 on my server (, the site'base url was and then I changed it to in the admin panel(configuration->web). The site now is not working correctly. I am pretty new to Magento 2.

Please help me out.Any help is greatly appreciated.

  • What do you mean by "not working correctly"? Where is the server root in relation to your magento2 folder? is your server root var/www/html and your Magento path var/www/html/magento2/index.php? Oct 15, 2017 at 14:36

2 Answers 2


Please check your base URL in database you can find it on core_config_data table, If its not correct then please change it. If its correct (I mean which you want) then there should be cache issue, please try to execute below magento 2 commands,

php bin/magento cache:flush

php bin/magento s:s:d

php bin/magento setup:di:compile
  • Thanks pal. I have executed your command but it did not work.I will check the table to see how it goes.
    – RRRay
    Oct 15, 2017 at 22:08
  • The table shows this web/unsecure/base_url |
    – RRRay
    Oct 15, 2017 at 22:32
  • The table shows my base_url : but I do not why the site is not showing correctly after I changed the site's url from (it was working correctly) to
    – RRRay
    Oct 15, 2017 at 22:35
  • Accept the answer If you find it helpful :) @RRRay
    – Keyur Shah
    Nov 29, 2017 at 10:29

you should copy all your website file to the web folder of your server like this :

in magento2/ folder run :

  • cp -r * ../

  • sudo chmod -R 777 ../

  • cd ..

  • php bin/magento setup:di:compile -php bin/magento setup:static-content:deploy
  • chmod -R 777 *

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.