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

ajck's avatar
Level 1

Moving Laravel 5.4 site from localhost to online shared server (with Laravel already installed and working)

I've got Laravel 5.4.15 on localhost with my site working fine, and Laravel 5.4.9 on my hosting account (I have FTP and SSH access and Laravel test page up and running). Just wondering how to move my site onto the online host.

I don't want/need to replace the entire Laravel structure on the online host given it's already installed by the host co and working (if it ain't broke don't fix it). Just wondering what needs FTP'ing up to the site.

It's a pretty simple app. so I'm just using some Models (app/), controllers (app/http/controllers), various css/js/fonts/images (public/), some blade templates (resources/views/) and some routes (routes/).

On the database front, I'm using Eloquent and have various migrations in the database folder which have created then made various changes to the db but can't I just export the whole Laravel DB from mysql on my localhost and import into the one online without having to run all the migrations (could get messy). Presume I need to change some config files too? Within the Laravel folders, structure seems exactly the same on localhost and online.

Thanks for any tips.

0 likes
5 replies
Borisu's avatar

It should be enough to upload the app directory as well as the resource and public + all the files in the root (like composer.json etc.)

ajck's avatar
Level 1

OK thanks. Anything special I need to do with the DB?

Borisu's avatar

If you want to use your current database you'll have to do a dump and then restore on the server.

ajck's avatar
Level 1

thanks - yes shared hosting

Please or to participate in this conversation.