> ## Documentation Index
> Fetch the complete documentation index at: https://kb.hosting.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Installing Laravel manually

> Learn how to install Laravel on your web hosting account. Just follow our step-by-step Laravel instructions.

This article describes how to install the Laravel PHP framework manually.

<Note>
  Although hosting.com servers are compatible with a wide variety of software applications, we cannot provide troubleshooting assistance for application-specific issues.
</Note>

## Installing Laravel

To install Laravel, follow these steps:

1. Log in to your account [using SSH](/docs/using-ssh-secure-shell).

2. 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:

   ```bash theme={null}
   cd ~
   composer create-project laravel/laravel project
   ```

   This command installs the Laravel project in the */home/username/project* directory, where ***username*** represents your username, and ***project*** represents the project name.

3. 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:

   ```bash theme={null}
   echo 'alias artisan="php /home/username/project/artisan"' > ~/.bashrc
   source ~/.bashrc
   ```

   > 👍 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](http://laravel.com/docs/artisan).

4. 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:

   ```bash theme={null}
   cp -r ~/project/public/* ~/public_html
   ```

   > 📘 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:
   >
   > ```bash theme={null}
   > cp -r ~/project/public/* ~/public_html/laravel
   > ```
   >
   > In this case, the Laravel site would be accessible at *[http://www.example.com/laravel](http://www.example.com/laravel)*, where ***example.com*** represents your domain name.

5. 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:

     ```
     require __DIR__.'/../vendor/autoload.php';
     ```

     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:

     ```
     require __DIR__.'/../project/vendor/autoload.php'
     ```

   * Locate the following line:

     ```
     require __DIR__.'/../bootstrap/app.php';
     ```

     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:

     ```
     require __DIR__.'/../project/bootstrap/app.php'
     ```

6. Save your changes to the *index.php* file.

7. In your web browser, go to *[http://www.example.com](http://www.example.com)*, where ***example.com*** represents your domain name. You should see the **Laravel** welcome page.

<Warning>
  **Important**

  Make sure you repeat steps 4 to 6 if you modify any of the public site files in the project directory.
</Warning>

## More information

For more information about Laravel, please visit [https://laravel.com](https://laravel.com).

## Related articles

* [Migrating a Laravel installation](/docs/migrating-a-laravel-installation)
