0

I am trying to install magento 2.4 on my local machine. When i try to access through url it shows directory structure https://prnt.sc/1jbghbf . I found that index.php is missing in the root directory. What can be done for this? Please help me with the installation.

2 Answers 2

0

What has happened is, they have implemented the "route everything through pub folder for security" approach.

You can find the file there.

Now Magneto Change the Structure, and website root folder is now "Pub" directory.

5
  • SO what i have to do to make it work?
    – Nafsss
    Aug 5, 2021 at 6:06
  • You need to modify some configuration. Kindly check this one : devdocs.magento.com/guides/v2.4/install-gde/tutorials/… Aug 5, 2021 at 6:10
  • If my answer help you into the current question, please upvote and accept as solution, so it will help other into community as well. Aug 5, 2021 at 6:38
  • I am getting this error during command line installtion Class Magento\Config\Model\Config\StructureFactory does not exist
    – Nafsss
    Aug 5, 2021 at 6:57
  • If you have different question ask separately, so other community member can also help you into that one. Aug 5, 2021 at 6:59
0

I had the same problem as yours, my method was simply to copy the index.php file from the pub folder to the outside, then edit the following line in the index.php file.

require __DIR__ . '/../app/bootstrap.php';

to

require __DIR__ . '/app/bootstrap.php';

Your Answer

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

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