I use a combination of two scenarios, SFTP to update the remote source on the server and SVN to just keep track of changes and history so that if I mess up something, I can throw it back. NetBeans supports both, when you create a PHP project through the wizard, you will be taken to the third page, which says that “Run the configuration of the project creation page”, select “Remote website” (FTP, SFTP), then you can change your settings to match your server’s data, and you can change the “Upload files” from “Run” to “Save” so that whenever you save a file, it is automatically uploaded to the server.
For SVN, after creating a project, simply right-click on the project name and select "Command" from the menu, and then import the project into SVN into the SVN repository if it is already in the SVN repo, you can use the menu command from the top menu bar and select "Check" to create a project from a source and automatically configure it under SVN control, then you can simply right-click on the project name and change "Run Configuration" to configure sending the project to a remote server on Save / Run, etc. .d.
Hope this helps.
source share