Laravel framework upload help

Hi admin,

I had recently tried to upload my Laravel project (pretty basic one, no need cron job or run command) tothe ftp server. I had also seen some posts regarding the same matter. I had found a post which mentioned to first move the files from the public folder and put them into the root directory of the Laravel project, then upload it to the ftp server (ie inside the htdocs folder). However, there are folders which will have name conflicts (ie folders have same name). Could anyone teach me how to correctly upload a simple Laravel project into the ftp server? Very appreciate your help!

Regards,
bentong95923

@bentong95923 try to upload files in parts of less than 10MB size as per on free hosting the file upload size is limited to 10MB. Try to compress file and decompress after uploading. Hope problem will solve sooner.

Hi @Ranakhas ,

Thank you so much for your suggestion. I had also thought about it before to save uploading time. However, my compressed file is over 10MB (~50 to 60MB). If its smaller than 10MB it could save me lots of time so far lol. I spent more than 8 hours yesterday to just upload my very simple Laravel to the server, and it ended up not working (keeps showing Whoops something went wrong). :frowning:

Regards,
bentong95923

@bentong95923 Your Welcome, I hope this may solve your problem.
File should always less than 10MB
Never compress file in .rar format if you want auto decompressing while uploading
If stuck somewhere feel free to ask me community instead of wasting time.
If you shy to ask the community you can also read old Forums.
For More info Visit infinityfree.net/support
Also your problems solutions is here never waste time, time is gold.

To be honest, Laravel was not really developed with shared hosting in mind. So while you can make it work on InfinityFree, it’s not ideal.

If there are folders with conflicting names, you should be able to merge them safely. The public folder should only contain static assets and the rest of the codebase should mostly be PHP code, so I don’t think there would be any file conflict.

Of course, the resulting code base will be a mess, but at least it works.

how about adding a .htaccess to redirect all traffic for www.domainname.com to www.domainname.com/public folder? so the browser will directly access the index.php inside the public folder

@bentong95923 said:
how about adding a .htaccess to redirect all traffic for www.domainname.com to www.domainname.com/public folder? so the browser will directly access the index.php inside the public folder

A .htaccess Redirect statement probably will give you redirect loop problems. However, creating an index.php file in the htdocs folder with the contents <?php header('Location: /public'); would probably do the trick as well.

@Admin said:

@bentong95923 said:
how about adding a .htaccess to redirect all traffic for www.domainname.com to www.domainname.com/public folder? so the browser will directly access the index.php inside the public folder

A .htaccess Redirect statement probably will give you redirect loop problems. However, creating an index.php file in the htdocs folder with the contents <?php header('Location: /public'); would probably do the trick as well.

Thanks for your reply. Before I attempt to do this I had recreated a new blank project which just contains the Laravel welcome page. I realised that even if I had put all the things inside the public folder out to the Laravel root directory it still gives me “Whoops looks like something went wrong” page (ie 500 server error). There is no log recorded. I had already edited all the path in the index.php and server.php file. It is quite strange since it is just a very simple Laravel homepage. Any clue?

Thanks so much for your help.
bentong95923