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

lat4732's avatar
Level 12

I need some tips on how to install my app on a live server

Hey!

I'm currently developing an app on my localhost. My customer just said that he want us to continue with the developing on a live server so he can track the progress. But I need some answers. We have totally removed the shared hosting from our list of possible hosting plans as it is laughably slow and not good at all. If we order an VPS - what is the procedure there in order to install the app? What requirements, how to actually install the framework and stuff like that actually bother me because this will be my first time to install a Laravel app on live server. The project is on Laravel 8.

If you could help me with some guides and steps for installing I'll be so grateful. Thanks!

0 likes
20 replies
Sinnbeck's avatar

If you are using git, and want something where you quickly can push changes into so he can see them, I can suggest using either Ploi or forge. Both can provision a server and deploying is very fast.

But dont code directly on the server. Its better to deploy say once a day so he can see the changes

lat4732's avatar
Level 12

@Sinnbeck I had to say that he will build a server on its own host. We wont use any companies to host our app or stuff like that.

P.S. I'm not using git.

Sinnbeck's avatar

@Laralex Who is that host and why is he building it?

If we order an VPS

This made it sound like you were in charge of getting the server.

lat4732's avatar
Level 12

@Sinnbeck I presented the information wrong. It's not my job what the server will be, who it is on, etc. In general, all that is required of me is to install the application on the server that he will provide me and everything I've built so far must work! I must give him PHP version, framework version and stuff like that. He'll install these kind of stuff. I'll just deploy the app, migrate the database and other thing like that.

lat4732's avatar
Level 12

@Sinnbeck Wait, wait. I'll have a direct FTP access to the files. And actually I've never used gits or stuff like that.

Sinnbeck's avatar

@Laralex So you are the only developer then? You can just use FTP then of course. I would suggest learning git in the near future though. It is a version control tool and will make is very easy to keep track of every file. And if you ever need to work with another programmer (a team), then it is very important.

lat4732's avatar
Level 12

@Sinnbeck I'm (currently) the only developer of the app. And yeah that's why I was confused when you said something about gits and stuff. I'll have a direct FTP access and control the files. The only problem is that as I said things like installing postgre, laravel framework and stuff like that bothers me.

Sinnbeck's avatar
Sinnbeck
Best Answer
Level 102

@Laralex You dont "install" laravel. You FTP the files up there. You can leave out the node_modules and vendor directories. When you have uploaded them, you SSH into the server and run the needed commands like

composer install
php artisan migrate
php artisan optimize

And as he is in charge of the server, you of course just ask him to install php, apache/nginx (and set it up), postgres and composer

1 like
lat4732's avatar
Level 12

@Sinnbeck Okay, is there anything specific about routes, caches and configuration at all? And what is actually php artisan optimize doing?

Sinnbeck's avatar

@Laralex It runs the following two cache commands as one

php artisan config:cache
php artisan route:cache
lat4732's avatar
Level 12

@Sinnbeck Okay, so just install php, apache, postgre, composer, deploy the files and then run things like php artisan migrate etc..?

Sinnbeck's avatar

@Laralex Yeah after you upload the files. As I said, I do not recommend developing directly on the server. Develop locally and deploy once a day or such. And the cache stuff can wait until the app is done.

lat4732's avatar
Level 12

@Sinnbeck ... logically. OK, as always - thanks for the information and your help! If I encounter any difficulties through the installation process I will make sure you know and ask for help!

lat4732's avatar
Level 12

Hey @sinnbeck.

Today was the day of testing the deployment of the app. I forgot to say that I'm using Postgre as a database, also I had to say that we build a whole server and I'm deploying the app through cPanel File Manager. What I did so far:

  1. Upload the files inside public_html.

  2. Edit .env and .env.example with things like APP_URL, database information etc...

  3. Opened the terminal through cPanel.

  4. Run php artisan migrate, which actually caused an error for old version of PHP, because we installed the newest composer which was released 6 days ago that requires minimum version of PHP 8.

  5. Changed the PHP version to 8.

  6. Tried to run php artisan migrate again which caused an error could not find driver .... Image of the error: https://imgur.com/a/Zq20WUx

Now I'm stuck. What should I do? What actually means this error? I really need help for the deployment.

The server has MySQL Databases and PostgreSQL databases installed. I defined in the .env files the following:

DB_CONNECTION=pgsql
DB_HOST=localhost

Is that actually correct? Should localhost actually work? Which file should I actually edit - .env or .env.example?

Also what should I do to run the app generally? php artisan serve is for local development, right? When I open the website URL right now I see a Index of / page with the files.

Also, currently the app is in subdomain of the main domain. Can this cause problems?

Thanks in advance!

lat4732's avatar
Level 12

Maybe I should create another thread for that problem?

Sinnbeck's avatar

@Laralex I suggest you do yes :) But most likely the guy managing the server just need to install pdo_pgsql

Please or to participate in this conversation.