Published 7 months ago by alesh
I just deployed my first Laravel application to my DreamHost shared hosting account. There are some guides online to help with this, but none of them quite worked for me, so I wrote a blog post with the steps I followed, which may be useful. Would appreciate any feedback, if there's something I missed or did wrong!
A suggestion, perhaps redo parts and let folks know the importance of main laravel being placed above webroot (htdocs, public_html). Here is an excellent guide that works:
Can be used also to setup development correctly in wamp, etc.
Folder structure example on a typical host: https://imgur.com/Oo6k4Fp
Honest, thanks for the guide, but I highly suggest a tweak or two for a proper install.
Thanks, Snapey; fixed!
jlrdw, I will try this and update my post if I can get it to work.
Meanwhile, is there a page that gives a good overview of the risks of doing it my way, note that when I try to access my .env file at http://mudsling.alesh.com/.env ... it doesn't actually work?
@alesh , the node_modules dir is created when you run
npm install which is for all the good front-end stuff. If you don't install any npm dependencies, then you don't have the folder.
On the other hand, I'll try a slightly different approach to what you suggest, namely, download the repository and then manually copy the vendor folder. That way, one can still benefit from version control while having to track only one folder manually.... or did you try that approach with little success?
Thanks, @alesh. Today I installed a fresh version of Laravel 5.6.24 using PHP 7.2 FastCGI on a Dreamhost domain. I haven't set up a database yet, but for a static website, it works.
A couple notes for others who may come here:
You can use git if you've enabled shell access. Just remove the vendor folder from your git ignore file.
PHP 7.2 is available on Dreamhost now.
I did not run any artisan commands - I just edited the .env file directly by renaming the .env.example file to .env and copying the APP_KEY from my local install.
For anyone else who may have missed the part about the /public folder, @alesh did mention it, but perhaps not in the big bold letters it deserves:
Under Web directory, add /public to the end of the domain name.