Under normal circumstances, Laravel can be installed quite simply. Before starting the installation, we connect to our server via SSH and install the components of Laravel by running the command line below.

composer global require laravel/installer


Then we go to the directory where we want to install Laravel or run the following line to describe which directory.


laravel new directory-to-install


If this command line does not work in some cases, you can alternatively try this command:


composer create-project --prefer-dist laravel/laravel directory-to-install


After this process, Laravel will install all the files it needs to run in the directory you specified for a few minutes. If you need detailed information, you can reach Laravel's official site here.


As you will notice after your installation, Laravel does not work under public_html for security reasons. In fact, it excludes almost all files from the folder structure that the publisher will see. Laravel's publish folder is "public". Therefore, we need to change the broadcast directory from "public_html" to "public" in our Virtual Host settings. In this way, Laravel, which tries to take high-level security measures, is expected to prevent access to files such as .env containing sensitive data.



In conclusion, I will not say Laravel is better than this, of course, because making this decision depends on both you and the project you are developing. But I can't help but say that Laravel is one of the best PHP frameworks.