Connect to a web server
Choose a deployment configuration based on where you want to access files:
In-place server configuration.
In an in-place server configuration, you open a project folder from an existing local web server's document root directly in IntelliJ IDEA. The configuration maps project files to URLs, and the server uses those files directly. Unlike with a local server configuration, you do not upload, download, or synchronize files between the IntelliJ IDEA project and a separate folder in the server file structure.
Local server configuration.
A local server serves files from a local or mounted folder at a local URL. In a local server configuration, you develop your application in a IntelliJ IDEA project, then upload the project files to the server’s document root, the folder from which the server serves files.
Remote server configuration.
In a remote server configuration, the server runs on another computer (a remote host). To access files on the remote server, use FTP/SFTP/FTPS/WebDAV protocols.
Before you start
Enable the FTP/SFTP/WebDAV Connectivity plugin
This functionality relies on the FTP/SFTP/WebDAV Connectivity plugin, which is bundled and enabled in IntelliJ IDEA by default. If the relevant features are not available, make sure that you did not disable the plugin.
Press Ctrl+Alt+S to open settings and then select .
Find the FTP/SFTP/WebDAV Connectivity plugin and click Enable.
Create separate configurations for different destinations. Each configuration has its own connection settings and mappings between project folders and destination folders.
If you need to deploy code to multiple servers, you can create a server group and avoid deploying to each server individually.
Server access configuration
A deployment configuration stores the connection settings and folder mappings used to access files. It does not install or start server software.
A server access configuration defines the following:
The server type (in-place, local, or remote).
The remote host for FTP, FTPS, SFTP, or WebDAV connections. In-place and local or mounted folder configurations use paths accessible from the computer where IntelliJ IDEA runs.
The server access configuration root: the highest folder in the server hierarchy that can be accessed through the server configuration.
The URL address to access the server configuration root.
The protocol to transfer the data through and the connection parameters.
The correspondence between local folders (that is, the folders under the project root), destination folders on the server (either local or remote), and URL addresses to access the data on the server. This correspondence is called mapping.
For example, your project is stored under C:/Projects/My_Project/ and contains a folder C:/Projects/My_Project/My_Folder, while a local server has the document root under C:/xampp/htdocs. You upload the entire project tree to C:/xampp/htdocs/My_Project. In the IntelliJ IDEA terms, the C:/Projects/My_Project/My_Folder folder is referred to as local and the C:/xampp/htdocs/My_Project/My_Folder folder is referred to as remote.
Create separate configurations for different destinations. Each configuration has its own connection settings and mappings between project folders and destination folders.
If you need to deploy code to multiple servers, you can create a server group and avoid deploying to each server individually.
Default server access configuration
You can set a server configuration as default to have IntelliJ IDEA silently apply it in the following cases:
Manual upload and download of files without choosing the target host.
Comparing local files and folders with their remote versions.
In the Settings dialog (Ctrl+Alt+S) , go to , select the required server access configuration in the central pane, and click
on the toolbar.
Alternatively, click the Default Deployment Server widget in the IntelliJ IDEA status bar and select the desired server or server group from the popup menu.
To configure the upload to the default server, go to .