Question

How to deploy a PHP Laravel source code in digitalocen

Posted February 9, 2021 8.1k views
DigitalOcean

I am a bit of a noob when considering for servers, i want to deploy a finished project that i have developed over my local machine to over the cloud using cloud services like digitailocen

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
Submit an Answer
2 answers

Hi @ahmedadelmywork,

Don’t worry, everyone starts from somewhere!

What you’ll need to do is, create a droplet, install MySQL,PHP, Apache or Nginx and then deploy your laravel application. It’s not that hard but for someone, without experience in this area it might seem overwhelming. Having said that, DigitalOcean have a great tutorial for exactly such cases. You can check it out here:

https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-laravel-with-lemp-on-ubuntu-18-04

It will basically, lead you through the whole process of installing and configuring a new Laravel installation alongside Nginx, MySQL and PHP. You can replace the new installation with your own

Now, there is an alternative, You can use the Marketplace Laravel Droplet which you can find here:

https://marketplace.digitalocean.com/apps/laravel

It will deploy a ready droplet with everything installed in it. You’ll just need to replace the Laravel there with your own code.

Regards,
KFSys

by Erika Heidi
Laravel is an open source PHP framework that provides a set of tools and resources to build modern PHP applications. In this guide, you'll install and configure a new Laravel application on an Ubuntu 18.04 server, using Composer to download and manage the framework dependencies. When you're finished, you'll have a functional Laravel demo application pulling content from a MySQL database.

Hi there,

In addition to what KFSys already mentioned, I could add that you could try out the new DigitalOcean App Platform. You could take a look at this video here on how to deploy Laravel to the App Platform:

The main benefits of the new App Platform are that you would not have to do any server setup, and you could have out of the box automated deployments whenever you push code to your GitHub repository.

Regards,
Bobby