Skip to main content

Slim

On this site, you find a guide to install Slim on CloudPanel.

Creating a Slim Site

Via CloudPanel

  1. Click on + Add Site and then click on Create a PHP Site.
Create a PHP Site
  1. Select the Application Slim 4, enter Domain Name, Site User, Site User Password, and click on Create.
Create a Slim Site

Via CloudPanel CLI

If you like the command line, you can create a Slim Site with the following command as root user.

clpctl site:add:php --domainName=www.domain.com --phpVersion=7.4 --vhostTemplate='Slim 4' --siteUser='john-doe' --siteUserPassword='!secretPassword!'

Creating a Slim Project

  1. Log in via SSH with the Site User:
ssh john-doe@server-ip-address
  1. Go to htdocs and delete the directory which CloudPanel has created:
cd htdocs && rm -rf www.domain.com
  1. Create a Slim Project via Composer:
php7.4 /usr/local/bin/composer create-project slim/slim-skeleton:~4 www.domain.com
  1. Done! Slim has been installed.
Welcome to Slim Site