> ## 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 Slim Framework for PHP

> Learn how to install Slim Framework on your web hosting account. Just use our step-by-step Slim for PHP instructions.

This article describes how to manually install the Slim Framework for PHP, a compact framework for developing web applications and APIs.

## Installing the Slim Framework

You can manually install the Slim Framework for PHP on your hosting.com account.

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

To install the Slim Framework, follow these steps:

1. Download the Slim Framework at [https://github.com/codeguy/Slim/zipball/master](https://github.com/codeguy/Slim/zipball/master) to your computer.
2. Extract the .zip file on your computer. You should now have a folder named *codeguy-Slim-bc5f5a8* (or a similar name).
3. Use FTP to upload the contents of the *codeguy-Slim-bc5f5a8* folder (but not the *codeguy-Slim-bc5f5a8* folder itself) to the **public\_html** directory of your hosting.com account. For more information about how to access your account using FTP, please see [this article](/docs/using-ftp-file-transfer-protocol).
   > 📘 Note
   >
   > Alternatively, you can upload the Slim Framework files to a subdirectory located beneath the **public\_html** directory. If you do this, make sure your PHP script files use the correct path to the Slim Framework subdirectory.
4. Use a web browser to go to your website's URL, such as `http://www.example.com`, where *example.com* represents your domain name. You should see the **Welcome to Slim** page.

## Running a test application

Now that you have the Slim Framework installed, let's run a quick test application. To do this, follow these steps:

1. Create a file named *slimtest.php* in your account's **public\_html** directory.
2. Copy and paste the following sample code into the *slimtest.php* file:
   ```javascript theme={null}
   <?php
   require 'Slim/Slim.php';
   \Slim\Slim::registerAutoloader();
   $app = new \Slim\Slim();
   $app->get('/hello/:name', function ($name) {
       echo "Hello, $name";
   });
   $app->run();
   ?>
   ```
   > 📘 Note
   >
   > This code sample assumes that you uploaded the Slim Framework files to the **public\_html** directory, which contains the **Slim** subdirectory. If you uploaded the Slim Framework to another directory, make sure you modify the path in the **require** statement.
3. Use a web browser to go to the URL[*http://www.example.com/slimtest.php/hello/world*](http://www.example.com/slimtest.php/hello/world), where\_example.com\_ represents your domain name. You should see **Hello, world**.
   > 👍 Tip
   >
   > As you may have noticed, the trailing part of the URL is handled as a variable. Therefore, you can type anything you want after the */hello/* section, and it will display in the browser.

## More information

* For general information about the Slim Framework, please visit [http://www.slimframework.com](http://www.slimframework.com).
* To view the online documentation for the Slim Framework, please visit [http://docs.slimframework.com](http://docs.slimframework.com).

## Related articles

* [Laravel](/docs/laravel)
