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

kjdion84's avatar

Setup Laravel 5 through PHPStorm via Composer for WampServer 3

This is a small guide for people to help get them started with Laravel 5 on Windows using PHPStorm 2016 and WampServer 3. I am creating this because it was a little frustrating for me as a Laravel newbie to get started in my local environment, and I had to go through several sources to get things running smoothly. So after almost breaking my keyboard with my forehead and figuring everything out, here is how I did it.

In this guide you will have already installed:

Step 1: Configure Composer in PHPStorm

  • Go to Settings -> Languages & Frameworks -> PHP -> Composer
  • Set the PHP executable path to C:\wamp\bin\php\php5.6.19\php.exe
  • Set the composer.phar path to C:\ProgramData\ComposerSetup\bin\composer.phar

Step 2: Create new Laravel project in PHPStorm (via Composer)

  • Go to File -> New Project
  • Select Composer Project on the left-hand side
  • Enter the Location you want Laravel to be installed in i.e. C:\wamp\www\my-awesome-project
  • Select Use existing composer.phar and ensure the path is there
  • Search for laravel/laravel in Filter packages and select it, you can leave the version as <default>
  • Ensure the path to the PHP executable is also set below (scroll down if you don't see it)
  • Click Create
  • Add /.idea to your .gitignore file

Step 3: Add the IDE helper dependency

  • Go to Tools -> Composer -> Add dependency...
  • Search for barryvdh/laravel-ide-helper
  • Click on the newest NON--dev version and Install
  • Add line to providers array in config/app.php - Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class,
  • Go to Tools -> Run Command... then enter php artisan ide-helper:generate in the command prompt

Step 4: Add vhost to WampServer

  • Make sure WampServer is running and navigate to http://localhost in your browser
  • Click Add a Virtual Host under Tools
  • Enter a name for the vhost like myawesomeproject
  • Enter path to public folder for vhost like c:/wamp/www/my-awesome-project/public
  • Right click the WampServer icon in the taskbar, go to Tools -> Restart DNS

You should now be able to visit http://myawesomeproject in your browser and it will display your Laravel project. Now all that's left to do is configure your environments and write your app.

0 likes
5 replies
jlrdw's avatar

Thank you for the share perhaps it can be moved to guides to help many people.

d3xt3r's avatar

Great guide, but why would you go through all this pain for just a dev environment.

  1. install composer
  2. create a new laravel project via composer
  3. php artisan serve

Best, if you use homestead for dev. Most of the things that you may require come in the box ...

kjdion84's avatar

@d3xt3r Uh...because some people might prefer using WampServer over a Vagrant box?

Also, the first 2 steps come naturally after you've done it once or twice (you only need to configure Composer paths in PHPStorm once). The other 2 steps are simply adding the IDE helper dependency and a virtual host. Not really a huge pain in the ass as doing this takes all of 30 seconds.

You forgot to add all the steps involved in installing Homestead, not to mention installing additional tools such as PHPMyAdmin which come with WampServer out of the box.

d3xt3r's avatar

@kjdion84 Well, believe me or not, I was on of those people at some point. Then i realised, managing redis, postgres, beanstalkd, etc. ....... by my self, is not something i want myself be doing on the dev machine .. rather rely on something that's well accepted and easy to set up.

Why waste time setting all this up for dev, when it is being served to you on the plate. It helps me concentrate on my application rather than all this ceremony ...

You forgot to add all the steps involved in installing Homestead

Its worth talking this trouble than installing each component individually

jimmck's avatar

@d3xt3r Going through the "Ceremony" is part of being a well rounded developer. Then I know how things go together and how to trouble shoot problems. Many times knowing how things work makes it easy to fix bugs in your code because the documentation is wrong or incomplete. During development is the best time to learn these things. Then when you move into production and the SA's could give a rats ass about your needs, you can intelligently plan a deployment.

Nice! @kjdion84 Storm 2016.2 now lets you define Project templates so Composer and your base packages and libraries are built for you.

Please or to participate in this conversation.