skip to Main Content

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.
enter image description here

Edit:
After running the php bin/magento setup:upgrade and php bin/magento setup:di:compile commands
enter image description here

5

Answers


  1. 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

    Login or Signup to reply.
  2. 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

    Login or Signup to reply.
  3. 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

    Login or Signup to reply.
  4. try this

    If you are facing theming issue after Installation in Magento 2. You can follow these steps :

    Run this query:

    INSERT INTO core_config_data (path, value) VALUES ('dev/static/sign', 0) ON DUPLICATE KEY UPDATE value = 0;
    

    For local machine run this query:

    UPDATE core_config_data SET value = '0' WHERE core_config_data.path LIKE '%web/seo/use_rewrites%';
    

    Remove all the files from pub and var directory:

    sudo rm -rf var/di var/generation/ var/page_cache/ var/cache/ pub/static/frontend/ pub/static/adminhtml/ pub/static/_requirejs/ pub/static/deployed_version.txt
    

    Give Permission to var and pub directories of your project:

    sudo chmod -R 777 var/* pub/*
    

    Upgrade Setup:

    sudo bin/magento setup:upgrade
    

    Deploy content:

    Login or Signup to reply.
  5. 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

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search