Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

DaviesJ89's avatar

[New to Laravel] - Deploying Developments

Hello

// Some basic Intro

I've recently taken the very scary dive in to using Frameworks for my PHP development, as opposed to constantly re-inventing all my code in all the projects I do. It's not until I purchased a Laracasts subscription and started working through some of the excellent videos to build my knowledge did I learn the power of Laravel (and also Vue which is a different topic again!!)

// My question

The biggest burning question I have; is that if I start using Laravel for my commercial developments, a lot of my developments are hosted on either shared hosting, or cPanel systems. The issue I now have is making my systems as easy to install and dynamic as possible - which isn't as straight forward as the outdated method of dictating URI's via directory structure.

So to summarise my query into a group of 5 quick questions:

  1. What if I wanted to install one of my developments in the root of a domain (easy) but I wanted to use the same Laravel development and install it in a different location, in a sub-directory such as /blog (which I can do with projects such as WordPress)

  2. Can you run 2x instances of Laravel projects on the same shared hosting account without modifying code?

  3. Can you make your Laravel projects deployable via FTP with no composer / SSH support? A question I know has been asked lots before, but is this acceptable within the community?

  4. I'd like to possibly deploy my product updates over HTTPS - as in the project files check the update server, and download updates when applicable. This would possibly mean keeping the whole project within a /public_html folder (including app & vendor files). I know this is also frowned upon which puts me off a bit, I clearly see the benefits of having all these files above the /public folder; but exactly how insecure are Laravel projects compared to any other? Other than the fact most of the code is Open Source of course.

  5. Is it beyond the realms of a laravel application to expect drag / drop / work functionality you can get from WordPress / OpenCart / phpBB and other popular solutions?

All these questions are similar and consistent with my end goal, and I think it'd be good for me to get my expectations of Laravel right from the start.

Thanks in advance!

0 likes
7 replies
christopher's avatar

Why you dont simply try it?

I see no approach from you that you tried something or read the docs or what ever. You only ask several questions and you hope you get your answers so you dont have to figure it out.

A bit lazy for a "commercial" developer or?

DaviesJ89's avatar

Hi Christopher

Thank you for your reply. I'm sorry you've percieved me as lazy; when in fact by taking the additional time and breaking down my unsurities in to a group of similar questions was an attempt to help explain what I wanted clearly as not to waste anyones time.

All I would like to do is gather opinion on the subject. That is all. In regards to any approach from myself, if actually deploying Laravel for such environments as described above is 'acceptable' (which if I'm very honest is the only thing I need to know), I am likely going to look in to deploying my developments using PHP itself, and as I have found such little documentation on this kind of setup, I'd need to test whether file permissions of default shared hosting environments would allow me to do such a thing out of the box.

I'll continue on my mission to find the answer.

Thanks again.

graham's avatar

Do yourself a huge favour and test Laravel Forge with an inexpensive cloud provider like Digital Ocean. You will never want to go near shared hosting ever again.

You can use the same server for multiple projects (or control multiple servers), deployment is laughably easy and you will save hours upon hours against trying to mangle Laravel into multiple shared providers.

DaviesJ89's avatar

Thanks Graham.

The Laravel community (rightly-so) continues to take a very streamlined approach in to deployment as much as they do the actual development.

And that's my biggest problem I think. I'm stuck in my ways of liking to offer my products to customers to place on their own hosting, without having to directly affiliate with a certain provider or hosting platform (such as your day to day cloud providers).

I'm not going to give up on Laravel - it's definitely the best PHP framework I have interacted with - it's managed to commit me to developing using a PHP framework for the first time!

The more I'm looking in to this I am giving myself two clear options.

Am I going to learn the hard way that Laravel is too streamlined to be provided as a popular, portable small-download for upload in to your run-of-the-mill hosting providers?

Or can I make this work as an exception by deploying my projects in to production mode myself then deploying them to my customers using the tools I am used to.

I knew this would always become a dilemma for me the more I learned Laravel. :)

robgeorgeuk's avatar
Level 14

Hey @DaviesJ89

I definitely don't have all the answers as I don't deploy to shared hosting but here's my 2c anyway.

Most modern frameworks are not designed with shared hosting in mind. Laravel makes this easier than most to deploy with Laravel Forge. The idea is that you get a VPS (e.g. Digital Ocean for $10/month) and then use Forge to manage deployment and updates of your sites. You do not need a different VPS for each site so, one VPS could potentially host many sites.

As to shared hosting. Some hosts are better than others and of course they will have to meet the minimum requirements (http://laravel.com/docs/5.1#installation) which rules out a lot of hosts.

Most shared hosts I've encountered will let you access, what is often called, the home directory via ftp or the file manager. This isn't accessible from the web but this is where all your Laravel files should live. There should be another directory often called "public" or "htdocs" or "www" and this is where the contents of the public directory from Laravel should go.

As to your questions.

  1. If you mean "can I install Laravel into a subdirectory e.g. /myproject?" then yes you can.
  2. I don't know.
  3. Yes, this is the usually only way with shared hosting. Please use SFTP though as most hosts offer this.
  4. I don't see why you would have to keep the files in /public to achieve this.
  5. Yes.

If you are trying to build something that can be wrapped up into a neat little installation package (like WordPress or some CodeCanyon package) that can be deployed with little knowledge to any type of hosting and will keep itself up to date then, personally, I'm not sure Laravel or any modern framework is the right choice.

Hope that helps.

1 like
jlrdw's avatar

There's probably a hundred answers on this already, have you tried to search the forum?

1 like
DaviesJ89's avatar

Thank you @robgeorgeuk, you have now fully confirmed my understanding of the uses of Laravel - I appreciate you taking the time to answer this question very informatively!

Please or to participate in this conversation.