Install Slim Framework 4

Slim is a PHP micro framework that helps you write simple web applications and APIs quickly. Learn how to install and tune Slim 4 on fortrabbit.

Get ready

For best results here, make sure you have completed all the steps from the get ready guide.

Root path

Go to the Dashboard and set the root path of your App to public.

Change the root path for App URL of App: {{app-name}}


Execute locally in your terminal:

# 1. Use Composer to create a local Slim project named like your App
$ composer create-project slim/slim-skeleton {{app-name}}

# 2. Change into the folder
$ cd {{app-name}}

# 3. Initialize a local Git repo
$ git init

# 4. Add all files
$ git add -A

# 5. Commit files for the first time
$ git commit -m 'Initial'

# 6. Add fortrabbit as a remote
$ git remote add fortrabbit {{ssh-user}}@deploy.{{region}}{{app-name}}.git

# 7. Initial push and upstream
$ git push -u fortrabbit master
# That's it.

# 8. From there on only
$ git push

You can see the welcome page in the browser: https://{{app-name}}

Seeing a "Hello world!" message now? You have succeeded. The rest is up to you. The Slim framework is very slim.

Further reading

Craft CMS

Install guides

Develop & deploy





Tips & tricks

Need individual help?
Learn about Company plans ›
Looking for an old article?
See the full list of articles ›
Found an error?
Contribute on GitHub ›