Introduction
I wanted a good PHP IDE which provides auto complete functionality, popup PHP documentation in the code view and seamless debugging experience for my WordPress development. I evaluated many tools for WordPress development and here is the list which has worked well for me:
1. XAMPP – ApacheFriends have built this excellent installer bundle which provides an installer to quickly install a pre bundled Apache web server, MySql, PHP, PHPMyAdmin and Control Panel in one go.
2. NetBeans IDE for PHP – NetBeans provides an excellent IDE for PHP which allows debugging even an existing WordPress installation.
WordPress Development Environment Setup
(Please note that I am providing environment setup for Windows environment but the high level details and steps will not vary much in a Linux environment)
1.Apache setup: One of the main problems encountered on Windows installed machines is that if IIS is installed and running then the apache port for both HTTP and HTTPS will need to be changed to a different one from 80 and 443 respectively. Refer this link for details on changing the apache port.
2. WordPress installation: Follow the WordPress installation documentation via this link. It is simpler to use PHPMyAdmin to create the MySql database required for WordPress installation. The WordPress documentation has details on this.
3. Netbeans IDE configuration: Debugging PHP code is not an out of the box experience via the IDE but require some settings for it to work properly. There are many questions in the NetBeans forum regarding PHP debugging issues and this problem has been resolved. I myself had to do a lot of digging around and googling to get this working.
Here is the recipe to get the debugging working:
(If you get this message “Waiting for connection (netbeans-xdebug)” in Netbeans while trying to debugging then follow the recipe below to get it fixed)
1.Download and install the latest version of XDebug (Debugger and profiler tool for PHP) from here. At the time of this writing, I used PHP_xdebug-2.0.3-5.2.5.dll. Add this file into the <<php installation>>\ext folder
2 .Zend engine has some compatibility with Xdebug and NetBeans IDE combination. Go to Apache bin folder and open php.ini. Comment out all of the items under section [Zend] and add the following under section [XDebug]
zend_extension_ts=”<<xdebuglib path>>\PHP_xdebug-2.0.3-5.2.5.dll”
xdebug.remote_enable=On
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
3.Follow this link on the NetBeans WIKI for help on openingĀ an existing WordPress instance in NetBeans IDE.
4.Add a breakpoint to any of the PHP server side code and try debugging. The recipe should have worked!
Cheers and happy WordPress development
{ 1 trackback }
{ 2 comments… read them below or add one }
Hey There, I have to say, that I lover your blog.
Please go on like that and don’t stop posting. I hope this comment motivates you to do so, smile
regards, kali
Kali, I am glad that you liked my blog and found something useful in here. Thanks for your motivation:-)
Cheers
Babu