Installing Symfony Framework into XAMPP for Windows

Installing Symfony Framework into XAMPP for Windows

Getting started

  1. Download a fresh copy of ApacheFriend XAMPP System and install it according to the tutorials.
  2. In the next step, we have to set the right include path to make sure that all pear packages will be installed in the right locations.
    1. Goto System Properties into the Advanced tab.
    2. Click on Environment Variables
    3. Extend the path variable by adding your path to php, mysql and pear:In my case, as I installed XAMPP to d:\progs\xampp, it was like adding


  3. Open a command line (Start menu, Start Application, Run „cmd“
  4. Enter your XAMPP directory:
    cd progs\xampp 

    (This folder might be different for you!)


  5. Upgrade pear:
    pear upgrade pear
  6. Install phing:
    pear install -a –alldeps
  7. Install symfony:
    1. pear channel-discover
    2. pear install symfony/symfony
  8. Update your \xampp\apache\conf\httpd.conf: #
    # Use name-based virtual hosting.
    NameVirtualHost myproject:80
    #access to /sf – directory
    Allow from All
    #symfony myproject
    ServerName myproject
    DocumentRoot „d:\progs\xampp\htdocs\myproject\web“
    DirectoryIndex index.php
    Alias /sf „D:\progs\xampp\php\PEAR\symfony\data\web\sf“
    AllowOverride All
    Order allow,deny
    Allow from All
  9. Update your C:\WINDOWS\system32\drivers\etc\hosts:         localhost         myproject
  10. Start your console again and change dir into the xampp\htdocs and create the directory „myproject“ there.
  11. Run symfony generate:project myproject
  12. Run symfony generate:app frontend (This assumes, you will need a app called frontend.)
  13. Open http://myproject/ in your browser. You should see the default symfony page, saying:
    Symfony Project Created Congratulations! You have successfully created your symfony project.
  14. Start your own Symfony project now!
2019-01-03T16:47:35+02:00Tags: , , , , , , , |


  1. Walter Lowell 11. Februar 2013 at 04:19 - Reply

    Greate post. Keep writing such kind of info on your site.
    Im really impressed by your site.
    Hey there, You’ve done an incredible job. I’ll definitely
    digg it and individually suggest to my friends.
    I am confident they’ll be benefited from this web site.

  2. Mike Schwedt 23. Februar 2013 at 21:25 - Reply

    Thanks for the info. One thing though, step 3 on Win 7 should include ‚run as administrator‘.

  3. Gintare 4. Juli 2014 at 16:17 - Reply

    I am getting the error message:
    „Firefox can’t establish a connection to the server at myproject.“

    I went though all your suggested steps several times.

  4. Gintare 4. Juli 2014 at 16:25 - Reply

    My httpd.conf looks like this:
    # Use name-based virtual hosting.
    NameVirtualHost myproject:80
    #access to /sf – directory
    Allow from All
    #symfony myproject
    ServerName myproject
    DocumentRoot “C:\xampp\htdocs\myproject\web”
    DirectoryIndex index.php
    Alias /sf “C:\xampp\php\PEAR\symfony\data\web\sf”
    AllowOverride All
    Order allow,deny
    Allow from All

    I have checked that directory „C:\xampp\php\PEAR\symfony\data\web\sf” does not exists, it is not created during installation. The directrory „C:\xampp\htdocs\myproject\web” exists.

    • Sven Seiler 10. Juli 2014 at 21:15 - Reply

      It seems like your Symonfy folder is located elsewhere. Do you get any errors, when running step 7?

      Install symfony:
      pear channel-discover
      pear install symfony/symfony

      You might check, if it will be installed into another folder.
      This tutorial is rather old. I wrote about it in 2011 already and things might have changed since then.

  5. Kim 21. November 2014 at 04:11 - Reply

    Thank for you help but I not pass on step 6

    C:\xampp\php>pear install -a
    Could not download from „“ (File not valid (received: HT
    TP/1.0 404 Not Found

  6. Andrew 3. Januar 2015 at 19:07 - Reply

    pear uninstall phing/phing

    and then:

    pear install –alldeps phing/phing-beta

    • Sven Seiler 6. Januar 2015 at 21:49 - Reply

      Thanks for you feedback. I wrote the article first back in 2012. It might not be still fully valid.

      • Gintare 9. Januar 2015 at 13:13 - Reply

        One more way to install symfony on Windows is
        1) to install WAMP from Bitnami

        2)to follow steps in

        Uncomment the following line that you can find in the Apache configuration file installdir/apache2/conf/bitnami/bitnami-apps-prefix.conf:

        Include „installdir/frameworks/symfony/conf/httpd-prefix.conf“

        Restart the Apache server: $ ./ restart apache
        It is also possible to restart Apache from „All Prorgams“ -> „Bitnami Wampstack“ -> „Wampstack manager tool“ – > „Manage Servers“ -> „Restart“.

        3) Point your browser to
        Follow steps in

        On Windows systems, execute the following console command:
        c:\> php -r „readfile(‚‘);“ > symfony.phar

        Save or move file symfony.phar to the directory where you create the Symfony projects and then, execute the Symfony installer right away with this command:
        c:\> php symfony.phar

        Create a new project called myproject:
        c:\> php symfony.phar new myproject
        This command downloads the latest Symfony stable version and creates an empty project in the myproject/ directory so you can start developing your application right away.

        Run the project from its directory:
        $ cd myproject/
        $ php app/console server:run

        Open your browser and access the http://localhost:8000 URL to see the Welcome page of Symfony.

    • Gintare 7. Januar 2015 at 09:42 - Reply

      Thank you so much!

  7. foysal 20. Mai 2015 at 06:05 - Reply

    Could you please help me in this issue?? Thanks

    • Sven Seiler 12. Juni 2015 at 17:41 - Reply

      Sorry, but I am not so much anymore in Symfony. I think I can´t help with this issue.

  8. olivedev 15. September 2016 at 13:16 - Reply

    I was looking to install Symfony on Debian, but couldn’t find any tutorial except for this one:
    This tutorial uses a specific platform called Cloudways, which sounds like a good tool. But I am just looking for manual installation of Symfony 3 on Debian.

  9. Tarquinius Superbus 12. Dezember 2016 at 20:31 - Reply

    Install Symfony through PEAR is no longer supported:
    Try Symfony Installer utility or Composer:

  10. olivedev 2. Juni 2017 at 08:34 - Reply

    Isn’t LEMP much better than XAMPP because of performance? I would recommend to setup a LEMP stack on your server for Symfony. The process of installing Symfony is quite simple and quick. I read an article on Cloudways blog about installing symfony on Cloud. They setup symfony on a preconfigure LEMP stack server. The installation process only included the composer command to install symfony.

    • Sven Seiler 3. Dezember 2017 at 02:23 - Reply

      Hey,it completely depends on your needs. But this post is already quite a few years old. Things are changing 🙂

Leave A Comment