Site icon WDB24

How to install Slim Framework 3 in windows using XAMPP

slim3 featured image

Slim is a powerful php micro framework which allows developers to create web applications. In this tutorial I am going to describe you about how to install Slim Framework 3.

I will use Composer for installing Slim Framework. So I am assuming that you already install Composer on your Windows machine. If you don’t know how to install composer then check my post how to install composer on windows with XAMPP

First of all create a directory in your xampp/htdocs folder. In my example I am taking testSlim folder. Once testSlim folder is created then create composer.json (file name should be same ) file inside testSlim folder. Now open composer.json and paste following  json code.

In the above json code “require” key is telling composer about your project dependencies.  slim/slim-skeleton is a package name which consist of two parts first part is vendor name and second part is project name. 3.* is a package version which means any version in the 3 development branch or  in other words version > 3.0 but < 3.9.


Now open your command prompt using xampp/htdocs/testSlim folder and type composer install.

Once you hit composer install, you will see the download process with package information and dependencies just like below.

Congratulation you have successfully installed Slim Framework on your XAMPP but job is not done right now.

Now goto testSlim folder under htdocs  and create index.php file and open it and paste below code in index.php and save it.

Now goto browser and hit testSlim url like http://localhost:8080/testSlim you will see hello World. That’s it.

I have started step by step tutorial on making website using slim 3 framework if you wish to learn click on below link.

Also Read:

Exit mobile version