Note: The scenario described in this document assumes that all resources -- web server, database, PHP sources -- are available on a local development machine. The project configuration might be different in the case of a remote development.
The WordPress sources are available at http://wordpress.org/. Just point your browser to http://wordpress.org/download/ and download the latest available version (v2.6 as of this writing).
Download the .zip or .tar.gz bundle and unpack it somewhere (e.g. /home/<yourname>/sources/). The sources will be extracted into the wordpress subdirectory.
Download and install NetBeans IDE 6.5 for PHP. You can get the latest development build from
http://bits.netbeans.org/download/trunk/nightly/latest/
or use the Beta (Milestone 2) when it becomes available.
Download the .zip or .tar.gz bundle and unpack it on your drive (e.g. /home/<yourname>/sources/).
Make sure you have Apache web server installed and running on your system. You'll also need to configure the PHP runtime and the XDebug extension. The configuration steps will vary depending on your development platform. Please refer to the Configuring Your Environment for PHP Development section of the PHP Learning Trail.
Make sure you have the MySQL server installed and running on your system. If you don't have it yet, please refer to the MySQL web site for detailed information on how to get and set up the database server on your development platform.
Once you have the server running, you will need to create a database for WordPress. You will also have to create a user that can create tables, and insert and select data in that database:
CREATE DATABASE wordpress;
GRANT ALL ON wordpress.* TO 'wordpress'@'localhost' IDENTIFIED by 'secret';
In this example, we created a database called wordpress and a user called wordpress with secret as the password. You are free to choose different names and password for your project.
Now you should have everything ready and set up create a WordPress project in NetBeans.
define('DB_NAME', 'wordpress'); // The name of the database
define('DB_USER', 'wordpress'); // Your MySQL username
define('DB_PASSWORD', 'secret'); // ...and password
Use the database name, user name and password that you selected in one of the previous steps.
Now you can start experimenting with the project in NetBeans. You can inspect WordPress code, step through it in the NetBeans debugger, make changes, or start developing your own WordPress extensions or themes.
| blog-title-page-crop.png | ![]() |
41309 bytes |
| new-php-project-step-0.png | ![]() |
36759 bytes |
| new-php-project-step-1.png | ![]() |
47506 bytes |
| new-php-project-step-2.png | ![]() |
51973 bytes |
| wp-config-in-netbeans-crop.png | ![]() |
128102 bytes |
| wp-config-in-netbeans.png | ![]() |
252373 bytes |
| wp-properties-crop.png | ![]() |
38906 bytes |
| wp-properties-setup.png | ![]() |
84260 bytes |