You can create and debug your PHP project locally and then deploy it on the remote server.
To do this, you need to set up and run configuration using an FTP or SFTP connection.
First, an open project with PHP Application from Remote Server.
In the next wizard window we can select:
Project Name
Source Folder – the location of the application source files
PHP Version – the PHP you use
Default Encoding – the encoding of your file
Put NetBeans metadata… – optional, the location of the project internal files.
… and press Next button.
The next settings are:
Project URL – the URL of your PHP website
Remote Connection – press Manage to set FTP or SFTP connection
Upload Directory – the folder with files to upload to your website.
NOTE: if you don’t have files the wizard will stop after will set the connection. Put in your folder: local and remote one file.
This will set the FTP or SFTP connection. Need to be the same with your website server.
Connection Name – give the name of your connection
Connection Type – set the type of connection: FTP or SFTP
Now, the settings of your connection:
Host Name, User Name, and Password – it’s the same as your web server connection.
Private Key File and Known host File – set if you know and have a key
Initial Directory – is the folder path of your website from your web server
Timeout(s) and Keep-alive … – just if you want to set that
This warning message will tell is to create and use a key.
Don’t worry will show when you try to connect to the website.
This is the folder from the webserver. I create an index file as I tell you (see NOTE)
The finish wizard file sees these folders and file.
The IDE shows us the files. Now you are ready to work on your project.
Click right on Source Files and select Synchronize… this allows you to synchronize your files with the files from your web server.
I will show how in the next tutorial. See you later.