I installed the latest Netbeans and did not find any PHP project templates to create a PHP project.
When I checked the New project options, It contains all standard web and maven application options.
This tutorial explains how to add PHP support and create a PHP project in Netbeans. It is easy to add PHP support via PHP Plugins.
Adding PHP support to Netbeans, the Developer has required tools such as an Editor, debugger, and documentation for PHP application development. First, Download and Setup Netbeans
Once Netbeans is running, add the php plugin to Netbeans.
How to add PHP Support in Netbeans
To add Php Support to Netbeans, Please follow the below steps.
- Open Netbeans IDE
- In Netbeans Editor, Select the
- It opens the
- Select the
- Select Configuration of Update Centers dropdown with the value
Netbeans Distributionoption checked if already not checked.
- Next, Go to the
- You will see a lot of plugins for PHP frameworks such as PHP, Zend Framework, CakePHP Framework, etc.
- Checked the
PHPoption plugin, It provides tools for PHP editor, debugger, etc.
- Click on the
Installoption, Follow instructions, it installs PHP and its dependencies ApiGen and PHP Static Analysis.
- Restart IDE to complete installation.
- Now, able to create PHP Projects.
PHP plugin is added to Netbeans, The Next setup is to update or change the PHP interpreter
- In Netbeans IDE, Select the
- Change the path of the PHP interpreter executable
- Update it if any settings are required.
How to create a PHP project in Netbeans
Once the PHP plugin is added to Netbeans, you will be able to see PHP application options in Netbeans.
To create a PHP project, please follow the below steps.
FileMenu + Select
New Project( or use the shortcut command
Ctrl + Shift + N)
- It Opens the
New Project windowdialog, Select the following
PHPin Categories on the left side, Right side, Select
- Next, Enter the following
- Project Name:
- sources Folder: newly created project location to save
- Optionally, You can choose the PHP version and encoding
- Next, you can also choose PHP frameworks
- Project Name:
- Click Finish, It creates a PHP application
- It loads the PHP app in Netbeans.
- Now, you are ready to work on the PHP application
PHP Plugin features in Netbeans
You can run the PHP project, by the below option
Run Project( use shortcut F6 key)
- You can see the running project in the browser or console view
Other PHP features supported in Netbeans
- You can also debug and test the applications, Natively Supports breakpoints, inspect for debugging
- Provides Code Completion, Syntax Colors, Search, and code files from tab to tab
- Supports integration with Git, SVN repositories