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

krestt123's avatar

How to Upload Laravel Project from Localhost to Shared Hosting

Can anyone one help me please with Uploading a Laravel Project from Localhost to Shared Hosting? Or it is impossible without having access to Terminal?

Thank you in advance!

0 likes
5 replies
jlrdw's avatar

@krestt123 First read https://laravel.com/docs/9.x/deployment#main-content

You may have to FTP up, I don't know your host.

You could push if using Github, again depending on host.

Of course import your database or migrate whichever applies.

Point to public as document root, Don't follow those tutorials that tell you to change laravels folder structure.

I have used this one with success for small sites: http://novate.co.uk/deploy-laravel-5-on-shared-hosting-from-heart-internet/

Before any migrating of real data, backup first.

Lara_Love's avatar

Zip the project folder and extract it to the root of the host. Put the contents of the public folder into the public html / create the database part of the database, user and password and tick all to give access / upload the database from the phpmyadmin part / change the .env file according to the new username and password / index file Change the .php as well, assuming your folder is called Laravel

require DIR.'/../laravel/vendor/autoload.php';

$app = require_once DIR.'/../laravel/bootstrap/app.php';

krestt123's avatar

Thank you all. Yesterday I had a chat with my Hosting Company, they sent me this Link: dev.to/massimocolella/step-by-step-guide-to-publish-you-laravel-project-on-a-shared-hosting-with-parallel-plesk-4p43

So for me the solution that worked the PHP Composer Feature in the Plesk. After FTP upload of the Laravel Project on Shared Server, I had to Delete the vendor and nod_modules folders. Then run this feature from Plesk (PHP Composer) and it re-downloaded all the vendors. After that all the common... Database connection etc....

Hope you find it also helpful

Please or to participate in this conversation.