D
D
DenKG2017-01-03 09:12:44
Laravel
DenKG, 2017-01-03 09:12:44

How to install Laravel on a regular hosting server?

Hello. I recently started learning Laravel, deciding that it would be better than working with WordPress. Installed it on my computer, used OpenServer. But now I decided that it's time to move on and need to install it on my hosting. That's just how to do it? Do you need a composer or something else? Well, all these stray from the local server. I would be grateful for the manual. Thanks :)

Answer the question

In order to leave comments, you need to log in

4 answer(s)
E
Eugene Wolf, 2017-01-03
@Wolfnsex

But now I decided that it's time to move on and need to install it on my hosting. That's just how to do it? Do you need a composer or something else?

Not needed. Composer is a package manager that unloads files into the "vendor" folder and updates them there, etc. There is no problem to upload them "by hand", in the final form, to the hosting.
The maximum that may be needed is the presence of an Apache server (which about 95% of hosters have) to override the project root directory.
The entire manual will be surprisingly brief:
1. Upload all files to the host ("as is")
2. Create an .htaccess file in the host root with the following content:
<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteRule ^(.*)$ public/$1 [L]
</IfModule>

3. Done
"Composer and something else" may be needed if there are some "deploy" mechanisms, but this is no longer hosting, but at least VPS, and it is desirable to have Git and other mechanisms there, etc. .. When you really need it - questions like the one you voiced above - will disappear by themselves :)

O
OnYourLips, 2017-01-03
@OnYourLips

You need a console to perform an application upgrade procedure, such as running migrations.
Good hosts usually provide access to ssh, choose those.
But the composer is not needed - the assembly of PHP dependencies, JS and CSS, you run the tests locally, and then copy them to the host.

D
darksladen, 2017-01-03
@darksladen

Everything is very simple! Install laravel on the local, then archive the folder, send it via ftp to the hosting, and then unzip it. This is the fastest and easiest way for me.

F
Flasher, 2017-01-05
@Flasher

You copy completely all files (absolutely all folders and files, as you have on the local server) to the hosting. You change .env (connection to the database) and in the app folder you change the database.php file (connection to the database). Everything!
Then you put putty and already there you work with artisan migrate to push all the tables into the database. Well, that's another question.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question