I am Patrick and a super beginner. my Magento2 admin page shows a 404 error(whoops, our bad...).

windows 10, xampp 3.2.4, php 7.3.27, magento 2.4.2., phpmyadmin.

and I changed apache port 80 to 8888, 443 to 8889. I put localhost:8888 of course.

I installed it with the sample successfully.

and I put '/pub/' in my domain using my DB table core_config_data(web/unsecure/base_url). Before I did

it, every page was a 404 error. Thanks to '/pub/', I could have saved a first sample page. Only the first page.(localhost:8888/mymagentoname/pub/ - It shows the first page well.)

But when I try to enter the admin page or others (ex. gear - bag) show me a 404 error.

domain/Index.php also makes a 404 error.

that lists are what I've done to resolve the 404 error,

  1. Cache clean and flush(cmd)
  2. Reindex(cmd)
  3. deploy -f(cmd)
  4. Check admin URL again(env.php)
  5. AllowOverride All(httpd.conf)

Whatever you comment, it would be helping me. Thank you.

2 Answers 2


Make sure that apache points to <magento_root>/pub folder, for example DocumentRoot /var/www/html/magento2/pub.

  • If you don't mind, would you explain to me in more detail, please? Like how do I check what apache is pointing now and if it is wrong, how can i change it. Thank you
    – 박준희
    Apr 8, 2021 at 8:02
  • can you please check this? there are more details here magento.stackexchange.com/a/335207/35330
    – Diana
    Apr 8, 2021 at 8:04
  • 1
    Thank you, I'm going to try it
    – 박준희
    Apr 8, 2021 at 10:02

magento version and php version not matched . You can check this link

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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