Configuring a NetBeans PHP Project for WordPress

I've been experimenting with WordPress a little bit lately while setting up a blog on my personal web server. The installation was completely smooth, but I was interested in some of the WP internals and also wanted to get a better understanding of what it takes to develop WordPress extensions. So, I set up a NetBeans PHP project for my experiments.

I thought other folks might be interested in this, or perhaps, would like to see how to set up a project in NetBeans for their existing PHP applications in general. Therefore, I wrote this brief tutorial and published it in NetBeans wiki. In the future, I'd like to write another tutorial about developing a real WordPress plugin.

 Comments welcome.


I have tried it and it's really very easy. It took me less than 2 minutes to run WordPress from NetBeans.


Posted by Petr on August 06, 2008 at 06:16 AM CEST #


I've just uploaded an article on how to Build an Abode AIR application with NetBeans.

You can check it out here:

PS. Maybe you can write blog about it on this site?

Posted by raymond on August 06, 2008 at 01:57 PM CEST #

It's really interesting. I will write an entry about it. In the next screencast you can show also some php features:). I like it.


Posted by Petr on August 06, 2008 at 07:55 PM CEST #

Many thanks Petr. Glad you liked it :)

In the next screencast I'll try to come up with a solution that will make use of a PHP back end.

Posted by raymond on August 07, 2008 at 09:03 AM CEST #


I must tell you this is the first time, I have experimented with wordpress installation, as I have been using blog for months now, as its free!

After reading this,

I have changed my mind, I would love to play with it, though locally, as I don't have a personal domain.

Thank you for wonderful support for PHP, I am glad I no longer have to synchronize my web application made in DreamWeaver with NetBeans PHP support in 6.0 (remember?).

I am using this after a long time, and have thought of checking out the new docs for the new support.

Now, I have some suggestions for the Wiki you made. Read the following excerpt from the section of the Wiki-

"We also want to copy the files to the location under the local web server's document root. Select the 'Copy files' check box and enter to root directory of the WordPress application (/home/honza/www/blog)."

Don't you think, one should mention the root folder of the local server, rather than the one you mentioned. Actually, I configured it with XAMPP, and root folder is basically- htdocs, so I had to specify that path, then installation was done!


Posted by Varun on August 07, 2008 at 01:42 PM CEST #

Netbeans PHP support is powerfull, I like It very much, use existing sources for a new project is very usefull feature, keep working guys

Posted by optik on August 08, 2008 at 02:01 AM CEST #

some body can help me?

Please I need to debug my php project, in the first time it works, but when i'd try to continue the next breakpoint, the netbeans show me a message that the port 9.000 is ocuppied by other aplication, but if i put in other ports, happen the same error.

I don't nowk what could happen, please how can i set this port?

My project use diferents pages, and directories, but the debug could not pass to the first page 'index.php'

thanks a lot, and sorry if my write english is to bad
The message is:

Posted by DM on August 13, 2008 at 05:29 PM CEST #

Hi DM,

I'm trying to solve the same problem on mailing list and I'm not sure, whether you are the same person.

Anyway, I haven't seen such behavior and my tip is that this is caused by a setting in your environment. Could you send me the output of phpinfo()?

Do you have installed Zend debugger? It can be another guess, that xdebug is in a clash with Zend debugger, but I'm not sure.


Posted by Petr on August 14, 2008 at 04:05 AM CEST #

Hi Varun,

>Don't you think, one should mention the root
>folder of the local server, rather than the one
>you mentioned. Actually, I configured it with
>XAMPP, and root folder is basically- htdocs, so I
>had to specify that path, then installation was

I think Honza mentioned in the tutorial this folder, because his local server is set up in this way. The document root of apache can be in user dir under a folder. Usually this is public_html or www.

NetBeans should recognized the default document root for apache. It didn't recognize in your case?


Posted by Petr on August 14, 2008 at 08:04 AM CEST #

Sir Petr,
I have a problem of connecting MySQL Database.It says:

Unable to connect to the MySQL serve. please check your setting in Properties and try again: java.sql.SQLException: Access denied for user 'root'@'localhost'(using password:YES)

I can't continue bcoz of this....what should I do?pls. reply. can you also send more links for sample & tutorial....i really want to learn for different application in NetBeans IDE.Thanks.

Posted by Edmund on September 05, 2008 at 02:07 AM CEST #

Hi Edmund,

sorry for the late response. I have seen similar request. Did you wrote it somewhere else too? :)

Did you check, whether the root user has a password?


Posted by Petr on September 08, 2008 at 11:45 AM CEST #

Although impressive it is missing the ability to automatically upload the files on save. Unfortunately until this feature is available I'll have to stick with Dreamweaver.

Posted by Chris on October 02, 2008 at 06:19 PM CEST #

Personally I think that the feature automatically upload the files on save is dangerous. I use many years a cvs, which have saved me many time my work.

On the other hand I agree that there are people, who want to use it. It's not correct that NetBeans 6.5 doesn't support this feature. It doesn't support it of the box, but you can assign a shortcut for the upload action like ALT+S and the upload action automatically saves the edited file. Also you can look here:


Posted by Petr on October 02, 2008 at 06:58 PM CEST #

does LAMP server is required for running PHP code in Netbeans IDE....plz help me........

Posted by sreejith on December 15, 2008 at 12:13 AM CET #

Hi Sreejith,

to run a PHP code in NetBeans you have to setup a PHP runtime. It's independent on NetBeans. NetBeans just reuses already existing environment.

LAMP is a distribution, where you can get most important part of the PHP runtime at once (Web Server, DB server and PHP). But you can install it separately one by one or install different web server, database etc.

If you don't know much about the PHP runtime, visit There are many useful information.


Posted by Petr on December 15, 2008 at 02:57 PM CET #

The NetBeans xDebug seems good in the 95% use cases -- however it has one big "Epic Fail": if the class violates its interface, the debugger (and PHP as it happens) fails silently and unhelpfully. (try it out!)

Any suggestions?

Posted by Dave Edelhart on May 12, 2009 at 01:29 PM CEST #

hi! Thank you for your support of php. i glad to write php in netbeans, its very nice! but i suggest you that support a php frameworke like prado in next versions of netbeans.
Thank again...

Posted by hamid on August 03, 2009 at 03:55 AM CEST #

I downloaded apache server and am trying to save a php file under htdocs but get a message saying permission denied. can anyone help? I need to save the file there in order to view it in localhost

Posted by steve on December 13, 2009 at 11:08 AM CET #

thank you for the information,
This was helped,
spirit! ! ! ! !

Posted by gunawan on August 08, 2010 at 09:17 PM CEST #

On a similar line, has anyone come up with a set up for Joomla?
I would be most interested.



Posted by Paul James on August 18, 2010 at 05:07 PM CEST #

Just had to do a bit of Googling so answered my own question. Some of the results could also be applied to Wordpress so worth a look-see.
From the Joomla site - and also a great video tutorial at

Posted by Paul James on August 18, 2010 at 05:43 PM CEST #

Nice post, it is helpful!

Posted by PHP Guestbook on November 22, 2010 at 03:00 AM CET #

i am starting with php iin netbeans , while executing it ti showing file not ound error

Posted by vikas on January 18, 2011 at 03:49 AM CET #

Post a Comment:
  • HTML Syntax: NOT allowed

This blogs is written by NetBeans developers who contribute to the PHP support mainly.


« July 2016