Laravel: Simple/Easy Installation Guide
This tutorial shows step-by-step guide to install Laravel. Here, I will show two ways for installation. One is installing directly by
composer create-project
command and the other is by cloning or downloading Laravel from GitHub and then running the composer install
command.
1) Method 1
– Go to your web server root
– In Ubuntu, it’s /var/www/.
– In Windows, if you install Wampp on C: drive then the server root is C://wamp/www/, for Xampp, it’s C://xampp/htdocs/
– Run the following command in terminal/command-prompt:
– In Ubuntu, it’s /var/www/.
– In Windows, if you install Wampp on C: drive then the server root is C://wamp/www/, for Xampp, it’s C://xampp/htdocs/
– Run the following command in terminal/command-prompt:
– This will create a directory with
– Then, you can simply browse
name-of-your-project
and install Laravel files in it– Then, you can simply browse
http://localhost/name-of-your-project/public
to access Laravel
2) Method 2
– Go to Laravel Github
– Clone or Download it to your web server root
– Suppose, you kept the cloned/downloaded files in ‘laravel’ directory
– Go to your Laravel directory (in Ubuntu Linux, it will be /var/www/laravel)
– Run the following command
– Clone or Download it to your web server root
– Suppose, you kept the cloned/downloaded files in ‘laravel’ directory
– Go to your Laravel directory (in Ubuntu Linux, it will be /var/www/laravel)
– Run the following command
– This will install the required dependencies to run Laravel. It will take some time to install all the dependencies.
– Now, you should be able to access Laravel properly without any error, e.g.
– Now, you should be able to access Laravel properly without any error, e.g.
http://localhost/laravel/public
Note 1:
If you are on Linux then you should also set write permission to
bootstrap/cache
and storage
directories.
Here’s the command to do so:
Note 2:
After this, you should be able to browser your Laravel site. If you get ‘No encrypter found’ error then it means that your site’s encryption key has not been generated yet. To generate the encryption key for your application, you need to follow the steps below:
– Go to your Laravel directory
– Rename
– Now, open terminal or command-prompt
– Run the following command on terminal:
– Rename
.env.example
to .env
– Now, open terminal or command-prompt
– Run the following command on terminal:
– You will see the message on terminaly saying application key set successfully.
– This will update
– This will solve this error and now you should be able to browse the site properly.
– This will update
.env
file present in your laravel root folder. In that file, it will set the value of APP_KEY
.– This will solve this error and now you should be able to browse the site properly.
Hope this helps. Thanks.
Comments
Post a Comment