2

Is it possible to Setup Laravel 5 Application without command-line access?

It's a common task do these commands with Laravel 5:

composer install
php artisan migrate
php artisan db:seed
gulp
[...]

Consider a non-dedicated server without SSH access, how can I setup the application in that environment?

Maytham Fahmi
  • 31,138
  • 14
  • 118
  • 137
Victor Aurélio
  • 2,355
  • 2
  • 24
  • 48
  • FTP copy your working Local environment, but that require every thing setup in deed like database konfiguration on Høst etc, and your domain point to public folder and Storage has write permission – Maytham Fahmi Apr 04 '16 at 14:40
  • Why are you thinking doing it that way – Maytham Fahmi Apr 04 '16 at 14:43
  • @maytham-ɯɐɥʇʎɐɯ I'm thinking of distribute my app to low-knowledge peoples, so is not cool put him to input commands in terminal, and also for small applications a dedicated server is too much... – Victor Aurélio Apr 04 '16 at 14:58
  • Not all host provider allow changing permissions or allow root access , so you need to find host provider that fixable and make guideline to your customer, that is it – Maytham Fahmi Apr 04 '16 at 15:01
  • @maytham-ɯɐɥʇʎɐɯ would be good a answer, so I can accept it. – Victor Aurélio Apr 04 '16 at 15:07

1 Answers1

4

Yes it is possible.

Briefly, when you have developed your Laravel on local environment you need to use FTP client/software (Like FileZilla FTP client) to upload the content to your host provider.

Before that you need to ensure some technical details so it can work

  1. Ensure have write permission to folder Storage.
  2. All Laravel folder should be upload, but the domain should point to Public folder.
  3. You need to configure your host MySQL database information in your project.

And it should work, the only challenge left here is to ensure you find host providers that allow make modifications on 1 and 2.

I suggest you to try it before distributing it to your customers and make a step-by-step guideline, as there is risk for unseen scenarios.

enter image description here

In addition to my answer, few links for reading:

Community
  • 1
  • 1
Maytham Fahmi
  • 31,138
  • 14
  • 118
  • 137
  • 2
    But how do you do migrations? – toster-cx Feb 28 '18 at 19:26
  • As explained you do migration on your local computer and when you finished your project, you move it via ftp to host computer. So I might have misunderstand you? – Maytham Fahmi Feb 28 '18 at 19:33
  • Interested in the same question. – Danny G Mar 15 '19 at 13:28
  • 2
    @toster-cx If the database is accessible from the internet, you could just edit your env file locally (on your dev machine) and execute the migrate function. If not, you can execute the migration (and seeds) locally and make a database dump and execute that on the server either with the tools your provider provides or with a PHP script. – Stan Aug 07 '20 at 09:45