I’ve installed Magento 2 on my ubuntu 20.04, I’ve tried to open up the landing page but it doesn’t compile well and all the css is disturbed too. It says:
The page you requested was not found, and we have a fine guess why.
If you typed the URL directly, please make sure the spelling is correct.
If you clicked on a link to get here, the link is outdated.
Please see the below image to get a clear idea about it.
What I’ve tried:
- Clearing out the cache using bin/magento cache:clean
- Compiling the static assets
- enabling developer mode.
Please guide how can i fix it. Thanks. Its new installation without any prior data.
Edit:
After running the php bin/magento setup:upgrade
and php bin/magento setup:di:compile
commands
5
Answers
did you run the setup:upgrade and di:compile commands
seems the generated files are not available
php bin/magento setup:upgrade
php bin/magento setup:di:compile
Maybe you have some trouble with the .htaccess file? Copy this file from git with the current M2 version and paste it to your project dir
Make sure in your database in the table ‘core_config_data’ that the web/unsecure/base_url and the web/secure/base_url match the url of the site you’re trying to reach.
Then just run:
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy
php bin/magento set:up
php bin/magento c:f
refresh the page and see if it fixes it.
Another thing i can think of is check your file permissions
You can find some info about this here: File permissions for M2
try this
If you are facing theming issue after Installation in Magento 2. You can follow these steps :
Run this query:
For local machine run this query:
Remove all the files from pub and var directory:
Give Permission to var and pub directories of your project:
Upgrade Setup:
Deploy content:
Please check the frontName in the env.php inside app/etc/env.php
else you can check the entry in the core_config table there the magento url is mention just copy and hit it on the browser