Update 2014: all Piwik developers use Phpstorm software, as it's simply the best available (though it's not open source!)

How to setup a complete PHP development environment on windows

This article explains how to setup a webserver, Eclipse (IDE), Debugging support (XDEBUG, how to setup breakpoint etc), SVN support on Windows. After following this article, you should be ready to start developing plugins or new features for Piwik, the open source web analytics platform''

UPDATE: You can also try the great tutorial on How To Setup a Free PHP Debugger using Eclipse PDT + XDebug

Web Server

You need php5 + Mysql + Apache 2

Download EasyPHP-2.0b1-setup.exe on

Install it.

You can change the DocumentRoot value in the httpd.conf file to match your working directory (for example F:/piwik)

IDE Eclipse

You now need to get eclipse with PHP support.

Download Eclipse + PHP = PDT on


PHP Debugger Xdebug

You need to download the Xdebug DLL for windows

php Debugger = XDebug php_xdebug-2.0.2-5.2.5.dll on

Copy the DLL in C:\Program Files\EasyPHP 2.0b1\php5\ext

Rename in php_xdebug.dll

Add at the end of your php.ini the following lines

zend_extension_ts="C:\Program Files\EasyPHP 2.0b1\php5\ext\php_xdebug.dll"






Restart Apache

Check that the apache error.log doesn't contain any error message

Check that a "<?php phpinfo(); ?>" displays a box "xdebug" somewhere in the phpinfo output

Git support

Piwik source code is hosted on Git hub at:

You can use the GIT plugin in the IDE to easily pull/commit/push from within Eclipse.

Final touch

Customize your environment by changing values in Window > Preferences > PHP

In piwik all source code files are using the UTF8 charset!

Create a new project (File > New > Project > SVN > Checkout the project from

Testing your environment

Try to debug:

  • set a breakpoint in index.php
  • Run > Open Debug Dialog
  • if needed, select "PHP Web Page" and click on "New launch configuration"
    • Server debugger = Xdebug
    • File > Browse the index.php to be debugged
    • Url > Unclick Auto generate > write the URL to the index.php
  • Click Debug, it should load a new page in Firefox and it should trigger the breakpoint in Eclipse


Screenshot of IDE eclipse with php support

Preview of the working eclipse IDE with php support

Screenshot of IDE eclipse with php support + XDEBUG debug feature enabled. The eclipse php debug feature is very very useful!!

You can display variables values, look at the backtrace, breakpoint anywhere, launch firefox automatically from eclipse to start debugging.

Preview of the debugging process in php in eclipse with XDEBUG


You should have a fully working IDE with PHP Debugging, SVN support, etc. Any questions?

Last modified 11 months ago Last modified on Oct 3, 2014 12:26:10 PM

Attachments (2)

Download all attachments as: .zip