Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Lordbedwetter's avatar

Can't Install New Laravel Project

I have ran composer global update, reinstalled xampp, allowed the intl and zip extensions, and it still fails at trying to install of psr/container and the following packages. Has anyone else had this issue on windows 11? If so, how did you fix it?

0 likes
4 replies
Tray2's avatar
Tray2
Best Answer
Level 73

I recommend using Laravel Herd and DBngin instead of XAMPP.

Without any logs it's impossible to guess what goes wrong.

2 likes
Lordbedwetter's avatar

@Tray2 This was the route I ended up going with. For anyone who reads this and is having issues after installing Herd, after the installation, restart Herd and if that doesn't work, restart your computer. I don't know if this bug is fixed yet, but it took me a while to find the solution.

I gave up on trying to get XAMPP to work and honestly, I'm glad I did. Herd is amazing and I wish I would have switched sooner.

Thank you for the reply.

chiefguru's avatar

@lordbedwetter I don't have Laravel installed as a global package, I just rely on create-project to build a fresh install. On Windows 11, I'm using the latest version of XAMPP, xampp-windows-x64-8.2.12-0-VS16-installer and in my php.ini, I've enabled curl, fileinfo, gd, gettext, intl, mbstring, xsl and zip. I made a fresh installation a couple of days ago with Breeze/Blade in preparation for a new project without any problems.

LaryAI's avatar
Level 58

To resolve the issue of not being able to install a new Laravel project on Windows 11, you can follow these steps:

  1. Ensure Composer is Installed Correctly:

    • Make sure Composer is installed globally and is accessible from the command line. You can verify this by running:
      composer --version
      
    • If Composer is not recognized, ensure that the Composer's vendor/bin directory is added to your system's PATH environment variable.
  2. Check PHP Version and Extensions:

    • Ensure that the PHP version meets Laravel's requirements (at least PHP 8.0 for Laravel 9.x).
    • Verify that the necessary PHP extensions are enabled. You can check this by running:
      php -m
      
    • Ensure intl and zip extensions are listed. If not, enable them in your php.ini file by uncommenting or adding:
      extension=intl
      extension=zip
      
  3. Clear Composer Cache:

    • Sometimes, clearing the Composer cache can resolve installation issues:
      composer clear-cache
      
  4. Update Composer:

    • Ensure you have the latest version of Composer:
      composer self-update
      
  5. Create a New Laravel Project:

    • Try creating a new Laravel project using the following command:
      composer create-project --prefer-dist laravel/laravel your-project-name
      
  6. Check for Specific Errors:

    • If the error persists, check the specific error message related to psr/container or other packages. It might be a dependency conflict or a network issue.
  7. Network Issues:

    • If you suspect network issues, try using a different network or disabling any VPNs or firewalls temporarily.
  8. Use Composer's Verbose Mode:

    • Run the installation command with verbose mode to get more detailed error messages:
      composer create-project --prefer-dist laravel/laravel your-project-name -vvv
      
  9. Reinstall Composer:

    • As a last resort, you might want to reinstall Composer to ensure there are no corrupted files.

By following these steps, you should be able to resolve the issue and successfully install a new Laravel project on Windows 11. If the problem persists, consider checking the Laravel and Composer documentation or forums for any updates or known issues specific to your environment.

Please or to participate in this conversation.