This is an MVC setup for quickly getting started with the Slim Framework version 3. It contains


  • Get the most stable without VCS
    composer create-project vespula/slim-mvc your/path (the most common method)
  • Get the most recent dev version
    composer create-project -s dev vespula/slim-mvc your/path
  • Get the most stable with VCS
    composer create-project --keep-vcs vespula\slim-mvc your/path
  • Or just clone or download the repository then run
    composer install, then composer run-script post-create-project-cmd.

If you choose to delete the VCS (.git) info for the project and use your own repository, make sure you modify the .gitignore file. The one that comes with it ignores the src folder, which you might not want to do when going on your own.

If you keep the VCS (.git) info, then you can put new projects created in the src folder under their own version control. The src folder is ignored by default.

Test the install

After you have your project, you can check that everything is working as expected by running the PHP built-in webserver.

$ cd /var/www/my-project/html
$ php -S localhost:8000

Browse to http://localhost:8000/ to see the default welcome app. You can customize the address to your liking.


If you have any issues, the first place to check is :

  1. is your alias or virtual host set up correctly and pointing to the /slim-mvc/html folder?
  2. if you have apache mod_rewrite on, check the .htaccess in the html folder and make sure the RewriteBase setting is correct. It may not be by default.