Although hosting.com servers are compatible with a wide variety of software applications, we cannot provide troubleshooting assistance for application-specific issues.
Installing Laravel
To install Laravel, follow these steps:- Log in to your account using SSH.
-
Laravel uses composer, a PHP dependency manager. To install Laravel, type the following commands. Replace project with the project name that you want to use:
This command installs the Laravel project in the /home/username/project directory, where username represents your username, and project represents the project name.
-
To enable running Artisan by simply typing artisan at the command prompt, type the following commands. Replace username with your account username, and project with your project name:
š Tip Artisan is the command-line interface to Laravel. When you create a Laravel project, Artisan isĀ installed automatically in the project directory. For more information about Artisan, please visit http://laravel.com/docs/artisan.
-
To make the Laravel project files accessible to web visitors, you must copy all of the files in the /home/username/project/public directory to the public_html directory. To do this, type the following command, replacing project with the project name:
š Note Alternatively, if you want to use a subdirectory beneath the public_html directory, copy the public files there instead. For example, the following command copies all of the public files to the laravel subdirectory:
In this case, the Laravel site would be accessible at http://www.example.com/laravel, where example.com represents your domain name. -
In the public_html directory, open the index.php file in your preferred text editor, and then modify it as follows:
-
Locate the following line:
Modify the path to include the directory whereĀ Laravel is installed. For example, if Laravel is in the project directory, you would change the line as follows:
-
Locate the following line:
Modify the path to include the directory whereĀ Laravel is installed. For example, ifĀ Laravel is in the project directory, you would change the line as follows:
-
Locate the following line:
- Save your changes to the index.php file.
- In your web browser, go to http://www.example.com, where example.com represents your domain name. You should see the Laravel welcome page.