Comments on How to Install Laravel PHP Framework on Ubuntu 24.04
Laravel is a web application framework based on PHP that is used to build enterprise web applications. It's a free and open web framework that follows model-view-controller (MVC) architecture and is based on Symfony.
3 Comment(s)
Comments
This is a very complete description of the processes required, but I think there are a few extra steps needed for a completely new installation.
I tried to follow this on a new WSL + Ubuntu setup, and needed the following:
1. Register the PHP repository "sudo add-apt-repository ppa:ondrej/php"
sudo apt update
2. 'echo "<?php phpinfo(); ?>" > /var/www/html/info.php' gives permission denied
3. 'Then, visit http://192.168.5.30/info.php' - assumes IP address of the local server?
4. 'nano .env' needs to be 'sudo nano .env'
5. database migration fails with 'Access denied for user 'root'@'localhost''
I'm not sure why this is not working
1. You don't need additional repository for PHP. The Ubuntu 24.04 provides latest PHP 8.3 packages.
2/4. This guide created using root user.
3. check your wsl IP address using ip command.
5. Please create specific database and user for your Laravel project as mentioned.
Sorry, point 5 was an error on my part, I had not removed the # (comment) marks from the database definition lines in the .env file. THis could be mentioned.
Bob