1

I am trying to install Magento 2.2.4 on windows localhost using XAMPP.

My XAMPP is installed I C:\xampp7.1

To use command line I using Command prompt in C:\xampp7.1\php>

And the following command:

php C:\xampp7.1\htdocs\Magento2_2_4\bin\magento setup:install --db-host=localhost --db-name=magento224 --db-user=root --db-password=root --base-url=http://127.0.0.1/Magento2_2_4/ --backend-frontname=admin --admin-firstname=admin --admin-lastname=admin [email protected] --admin-user=admin --admin-password=admin@123

But it always giving error: Can't create directory

C:/xampp7.1/htdocs/Magento2_2_4/generated/code/Magento/Framework/App/Config/ConfigSourceAggregated/. in [Magento\Framework\App\Config\ConfigSourceAggregated\Proxy]

I have given Magentonto root directory permission 777 using Cygwin

Please guide me in setting proper permissions to Magento's root directory and its ownership on windows localhost

5
  • You can struggle of course with all stuff you'll face with using windows. But the best solution is vagrant or Docker. So if you ask for guide - then my first step of guide for you is - use linux. Magento2 doesn't support windows. Commented May 20, 2018 at 10:05
  • As which user are you running the php /bin/magento command? I also agree with @StepanFurman - switch over to a real linux environment using vagrant or docker. Not much works very well under windows =( Commented May 21, 2018 at 11:46
  • As administrator Commented May 21, 2018 at 11:47
  • 1
    @Cyclonecode What's the difference if permissions - 777? Commented May 21, 2018 at 12:16
  • I think there was some issue when using chmod 777 Magento224 because I haven't been able to edit or delete any files after this. So I have just deleted whole magento folder and re extracted it. It is now working fine.. I am never ever going to use chmod 777 with cygwin in windows. Commented May 21, 2018 at 18:59

1 Answer 1

3

Remove generated folder and try again.

2
  • This should really be a comment, your answer that is =) Commented May 21, 2018 at 11:45
  • this worked for me along with setting the permission to magento root, pub and static folder on windows takeown /F C:\xampp\htdocs\magento223
    – Ankur Jain
    Commented Apr 20, 2020 at 6:26

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.