What is the process to upload my app to a shared server
Hi,
After avoiding PHP for years I decided to try Laravel and so far I like it. I don't have any previous experience with server languages nor frameworks (except for Cocoa for iOS and QT for C++ frameworks) and one question that has come to my mind lately is, how difficult it will be to port my application to a shared hosting? All examples I have seen here in Laracasts are based on dedicated servers. I could try to upload it but I don't want to waste any time without getting some advice first.
1- How difficult would it be to port my application to a shared server? Is this even possible?
Now, lets pretend that I go with a better hosting, what is typically the amount of work that it requires? Do I need to install Composer, Virtual Box and Homestead?
Which shared hosting service you plan on using? Fortrabbit and Forge are recommended (there's a full series on Forge here). Heroku is also a good platform, you can deploy your app for free and if needed, subscribe for the premium features.
@luddinus
How about security, are there any differences between shared vs dedicated servers when it comes to security? In other words, is there anything I would need to do to make it more secure or do some sort of maintenance?
@Ruffles
I currently have eleven2.com.
Fortrabbit seems a little to expensive for my start up app (10 euro/month). Forge is also $10/month. I have heard about Digital Ocean which is only $5/month, is that a good choice?
Not sure I understand the problem. You can develop your project locally and then upload your project files to the shared host. Why would that be a problem?
@luddinus yes that can happen, you are right. In that case you have to do something like you mentioned.
But there should be enough shared hosts available which have access to private folders. The ones I use (not expensive, $2-5/month, but still very good and fast) all have that.
@Mattiman
If I understood this correctly and based on the file structured below which is how my server looks, I would put the files from the "public" folder from Laravel into the "public_html" folder in my server and the rest of the folders from Laravel will go at the same level as the "public_html" in my server, correct?
.cpanel
.ssh
etc
logs
mail
public_ftp
public_html
tmp
.bashrc
@luddinus there are some shared hosts that don't allow to have folders one level above.
When you say one level above, do you mean at the level of the "public_html" folder? If yes, I just tried it and I was able to create a folder at that level.
Bear in mind that you'll need to be able to make the storage folder writeable, so make sure you're allowed to change permissions in your "one level above" :)
And with "folder above the public_html level" one does mean the root level in the example above. So the folder in which the folders shown above are is the level "above" compared to the public_html. Since only public_html is public accessible, the app files and everything else is not.