Zend Framework 2 – How to Create A New Project

Update: Try the new tutorial here.

There has been lots of confusion with new Zend Framework 2 lately. The manual on Zend Framework‘s website is horrible (in terms of beginner manual and documentation) and is designed for advanced user’s with Zend Framework 1 extensive experience.

Many user’s are still unable to create a first basic folder structure to begin using Zend Framework 2 library. The initial example is provided here. I’m going to break it down for you  guys.

(Note: This instruction guide assumes you have successfully installed Zend Framework 2 and its library. Also, this instruction guide uses EasyPHP 5.4.6)

Step 1: Download the Zend Framework Skeleton Application from here. Secondly, extract the files into your root (www) localhost folder and rename the folder to anything you want. I will call it “zend_project1”.
This file provides you with all the necessary files to create your basic folder structure.

Step 2: Open your Terminal. (In Windows 7, click Start and in the search box type “cmd” (no quotes),  and click cmd.exe.

Step 3: Once opened, use the “cd” command to navigate to the folder where you extracted   your zip file you downloaded in step 1. My command looks like this “cd C:\Program Files (x86)\easy_php\www\zend_project1”. You should be inside the folder now and your line in Terminal should resemble this “C:\Program Files (x86)\easy_php\www\zend_project1”

Step 4: Now type this command, “php composer.phar self-update” and press Enter.

Step 5: Type another command, “php composer.phar install”. This will create your directories for basic skeleton application.

That’s all. Now, open your browser and navigate to your localhost and zend_project1/public folder (mine looks like this: You should see this website. If you do, then every step has been successfully completed.

18 thoughts on “Zend Framework 2 – How to Create A New Project

  1. Personalized Jets Jersey

    This layout is so stellar. How did you manage to make a blog thats as smart as it is sleek? I mean, its like an Aston Martin –smart and sexy at the same time. I have got to say, the layout alone made me come back to this blog again. But now that Ive read what youve got to say, Ive got to share it with the world!

  2. Custom Panthers Jersey

    Thanks a lot for sharing. You have done a brilliant job. Your article is truly relevant to my study at this moment, and I am really happy I discovered your website.

  3. parth vora

    when i run “php composer.phar self-update” command in cmd, i got error like ‘php’ is not recognized as an internal or external command, operable program or batch file.

      1. Gireesh


        When i run “Php composer.phar self-update” command in cmd, i receive the error as below.

        “Fatal Error: Class Phar not found in C:\Apsrv\www\site\composer.phar on line 13”

        Could you please guid me on this.

        Thank you

  4. Ciekawa lista

    Fantastic post however , I was wanting to know if you could write a litte more on this topic? I’d be very grateful if you could elaborate a little bit further. Bless you!

  5. Mostafa

    Nice tutorial. I really appreciate such nicely simplified tutorial. I searched the whole Zend site, bought a book, still was unable to begin the action.Thanks very much.


Leave a Reply

Your email address will not be published. Required fields are marked *