Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialTim Bleakley
676 PointsSetting up Laravel on a custom WAMP setup
I am running WAMP server 2.4 on my dev machine and was hoping it would be possible to set up Laravel to work on my environment without having to install VirtualBox/Vagrant and all that. I have currently got it working by just placing the files in my 'www' directory in my WAMP folder. However I don't think the routing works and I may have difficulties setting up the database (haven't tried yet). I should add that I have installed Composer and Artisan seems to be working fine. Any tips? Many thanks!
2 Answers
Placid Rodrigues
12,630 PointsI have installed Laravel on WAMP successfully with the following steps. You can follow this process: (I have copied and pasted the steps from my MS-Word file, so the text formatting is not good here)
- Open php.ini with text editor a. Look for “extension=php_openssl.dll” b. If it was uncommented already, you don’t need to do anything here. Close the file. c. If it was commented, that means, if there is a semicolon (;) in front of it, remove the semicolon, save and close the file and restart wamp.
- Download Composer (https://getcomposer.org/Composer-Setup.exe)
- Install Composer a. When asked for php.exe location, browse to C:\wamp\bin\php\php5.x.xx\php.exe (The php5.x.xx will be your php version) b. Accept all other defaults
- Install Git from http://git-scm.com/ a. Accept all defaults when installing
- Make sure php and composer are working ok a. Open Git Bash b. Type the following in Git Bash and press enter: php -v It will show the php version and some other info c. Type the following in Git Bash and press enter: composer -v It will show the composer version and some other info
- Install your first laravel project a. In Git Bash clear your screen by typing “clear” b. To move into your www folder, type the following in Git Bash and press enter: cd C:/wamp/www c. Let’s say your first laravel project will be named “my_first_lara_project” d. Type the following in Git Bash and press enter: composer create-project laravel/laravel my_first_lara_project –prefer-dist
- Go to your browser and type the following address: a. http://localhost/my_first_lara_project/public b. You should see the “You have arrived” message c. You may be excited to see it. But there is one more step.
- Start laravel’s built in development server: a. Open Git Bash b. Type the following in Git Bash and press enter: cd C:/wamp/www/my_first_lara_project c. Type the following in Git Bash and press enter: php artisan serve d. Keep the Git Bash open while you are working on your project
- Go again to your browser and type http://localhost:8000 You will again see the “You have arrived” message
- Installation complete
- Next time when you start working on your project, repeat step “Start laravel’s built in development server” first.
Petros Sordinas
16,181 PointsHi Tim,
Laravel needs the following installed:
PHP >= 5.4
Mcrypt PHP Extension
OpenSSL PHP Extension
Mbstring PHP Extension
Tokenizer PHP Extension
If you have these installed on your WAMP installation, you should be ok. Furthermore, you should have this in your .htaccess file in your laravel /public folder
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
That should probably solve your routing problem.
All the above taken from the laravel documentation online (http://laravel.com/docs/5.0/installation)
bushaf
34,523 Pointsbushaf
34,523 PointsI would like to thank you for this answer Placid Rodrigues, you have helped me a whole lot in both using Git Bash, installing Laravel 5 and maintaining the workflow of treehouse's favorite mac terminal to work on Windows in the simplest way i have seen so far.
Placid Rodrigues
12,630 PointsPlacid Rodrigues
12,630 PointsHi Bozidar Siljanoski,
I am so glad that I could help. Thanks for your kind words.
Best wishes,
Placid