Hi, i’m new at Digitalocean, and i want to deploying my laravel website with a postgresql as a database for my website, i have created a droplets, and search a tutorial. But i still confuse because there’s no tutorial to host a laravel and postgresql at a droplets from creating and then setting up a droplets until deployin a laravel website. Can anyone help me?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
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.
Heya,
check this article here :
https://www.digitalocean.com/blog/create-simple-contacts-laravel-postgresql
it should provide you with the needed steps to achieve this.
Hi there,
You’ve got a straightforward path to get things running!
Spin up the Laravel 1-Click Droplet:
Stop and Disable MySQL (since you’re using PostgreSQL):
SSH into your Droplet and run:
This frees up resources and avoids conflicts.
Install PostgreSQL:
.env
with the connection details.Install PHP Modules for PostgreSQL:
Make sure you have the necessary PHP extension:
Run Laravel Migrations:
Deploy your code, then run:
(Optional but Recommended) Use Managed PostgreSQL:
Let me know if you have any questions.
- Bobby