Installing Laravel PHP Framework on XAMPP

This is a straight-to-the-point tutorial on how to install and use the Laravel PHP framework with a local XAMPP server on your machine’s localhost. This post covers installing Laravel, but be sure to read other posts here in the Laravel Category to learn much more about the Laravel PHP framework.

Prerequisites:

  1. php version 5.3.7 or higher
  2. mcrypt module which comes with xampp and wampp by default so you shouldn’t have to do anything, but maybe check php info to make sure it’s there.
  3. Make sure openssl is enabled in your php.ini file
  4. make sure your httpd.conf file includes the httpd-vhosts.conf file in it.

Install Directions

  1. First, install composer by going to http://getcomposer.org/download/ and clicking on the link that reads: “Composer-Setup.exe” just under the “Windows INstaller” heading on that webpage.
  2. Secondly, install Laravel by going to http://laravel.com/ and click on the “Five Minute Quickstart” button to get a full set of instructions in case you need help, but I’ll give you the basic install steps next to keep it quick and easy for you.
  3. Go into your Xampp directory, open the htdocs folder and make a new directory for your Laravel project. You can name it simply “laravel” if you like to keep it easy to follow these instructions.
  4. Open your Command Prompt in Windows by clicking on start/All Programs/Accessories/Command Prompt and change your current working directory to that of the laravel folder you just created by using the cd command followed by the directory path.
  5. copy and paste the following text into your command prompt window: composer create-project laravel/laravel your-project-name --prefer-dist
  6. before you hit enter, replace “your-project-name” with a project name of your choice such as “project1” as I did for this tutorial. Then press enter and Laravel will take several minutes to install usually.

That is all there is to a simple install on Xampp. Now you can go to your favorite browser and open up http://localhost/laravel/project1 and you should see the Laravel logo along with a quick message saying “You have arrived.” Now it’s time to learn how to use Laravel and find out about some of Laravel’s features.

Bundles

Bundles are add-ons that you can download and plug into your Laravel installation for added functionality. Be sure to check out the bundles at http://bundles.laravel.com/

Click on the Laravel category at the bottom of this page or type “laravel” in the search box of my blog to find more tutorials on Laravel right here! …or CLICK RIGHT HERE to jump there now.

22 Replies to “Installing Laravel PHP Framework on XAMPP”

  1. Hi sir. Thank you for your easy to follow guide. When I installed laravel and navigated to my project, it didn’t give me the You have arrived message. Just showed me the index for laravel. Should I be worried? I am a real newbie here. Thanks again

    1. I am am sure you have come right by now, but for those that have the same problem – as I had I thought I would reply anyway. I found elsewhere that you should navigate to /public, for example using the structure provided in the tutorial:

      http://localhost/laravel/project1/public

      I think that is all that is missing from the explanation.

  2. Nice and simple tutorial. Thanks a lot!
    Just to mention that I was struggling with it to get the logo indicating that everything went ok and I got it by slightly changing the path to get the logo to
    http://localhost/laravel/project1/public since the index appeared to be located there after the installation.
    However I don’t know how relevant this is.
    Thanks again!

  3. Is there any way to have the index in the laravel directory, instead of “public”? I tried moving the index file to laravel but I got a couple of errors

Leave a Reply

Your email address will not be published. Required fields are marked *