Import from Deployment Configuration Dialog
The dialog is available only when the PHP and FTP/SFTP Connectivity plugins are installed and enabled. The plugins are not bundled with IntelliJ IDEA, but they can be installed from the JetBrains plugin repository as described in Manage plugins. Once enabled, the plugins are available at the IDE level, that is, you can use them in all your IntelliJ IDEA projects.
The dialog box opens when you click the Import button on the toolbar of the Servers page.
| From this drop-down list, choose the server access configuration (deployment configuration) to copy the server access settings from. The list contains all the available deployment configurations. To create a new configuration, click and specify new settings in the Deployment: Connection Tab dialog that opens. |
In the text box below, specify the absolute path to the server deployment root folder, the name of the text box depends on the type of the selected server access configuration: Absolute path to the deployment root for FTP/SFTP/FTPS or Remote path to the mounted folder for Local or mounted folder.This path will be added as a prefix to the path from the Root Path field on the Deployment: Connection Tab.
If you are not sure about this absolute path, you can open the Remote Host tool window, choose the required deployment configuration, position the caret at the root folder, and choose Copy Path from the context menu, see Access files on web servers for details. Alternatively, contact your hosting provider.
Absolute path to the deployment root/
| Depending on the type of the server access configuration chosen from the Deployment list, specify one of the following: |
| The area shows the host/port and the path mappings retrieved from the chosen server access configuration (deployment configuration). |
When you choose the deployment configuration to use, the Absolute path on the server field shows relative paths mapped to the project files and folders in the chosen configuration, that is, paths to files and folders relative to the deployment root. As you specify the absolute path to the deployment root (the server root for FTP/SFTP/FTPS or the mounted folder), the contents of the field are updated automatically and finally the field shows absolute paths on the server.
Path mappings in PHP Debug Server configurations look very similar to the path mappings in server access ( deployment configurations. Unfortunately, they cannot be reused, as deployment configurations uses relative paths while PHP Debug Servers configurations rely on absolute paths.
If you do not specify any path mappings and start debugging an application that is not under the server document root, IntelliJ IDEA displays an error message:
The Click to set up path mappings link brings up the Resolve Path Mappings Problem dialog, where you can define the path mappings:
When you click OK and leave the dialog, the Use path mappings checkbox on the Servers page gets selected automatically.