IntelliJ IDEA 2024.1 Help

Deployment

IntelliJ IDEA assumes that all development and testing is done on your computer, and then the code is deployed to a staging or production environment.

The reason to stick to this "local development — deployment" model lies in the way IntelliJ IDEA provides code completion, code inspections, code navigation, and other coding assistance features. All this functionality is based on the project files index which IntelliJ IDEA builds when the project is loaded and updates on the fly as you edit your code. Fast indexing and re-indexing of files can be ensured only for local files, that is, files that are stored on your hard disk and are accessible through the file system.

When you are done with development, you can deploy your local project files to the web server using IntelliJ IDEA.

Interaction between IntelliJ IDEA and servers

Interaction between IntelliJ IDEA and servers is controlled through server access configurations. Anytime you are going to use a server, you need to define a server access configuration, no matter whether your server is on a remote host or on your computer.

Taking into account all the above, let's define the following basic concepts related to synchronization between IntelliJ IDEA and servers.

  • In-place server configuration.

    In an in-place server configuration, you are using a local web server, but unlike with the local server configuration, don't upload/download or synchronize files between the IntelliJ IDEA project and the project folder in the server file structure. Instead, you open the project folder from the server document root directly in IntelliJ IDEA, and thus do the development on the server directly.

    Create an in-place server configuration

  • Local server configuration.

    A local server is a server that runs in a local or mounted folder and serves files to a local URL address. In a local server configuration, you do the development in a IntelliJ IDEA project, and then upload the project files to the document root on the server.

    Create a local server configuration

  • 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.

    Create a remote server configuration

  • The server configuration root is the highest folder in the file tree on the local or remote server accessible through the server configuration. For in-place servers, it is the project root.

  • A local file/folder is any file or folder under the project root.

  • A remote file/folder is any file or folder on the server.

  • Upload is copying data from the project TO the server, either local or remote.

  • Download is copying data FROM the server to the project.

After you have configured synchronization with a server, you can upload, download, and manage files on it directly from IntelliJ IDEA. Moreover, you can suppress uploading or downloading specific files or entire folders. Finally, you can optimize your workflow by configuring content roots so specific folders are not involved in indexing, which significantly saves project indexing time.

Synchronization with servers, uploading, downloading, and managing files on them are provided via the FTP/SFTP/WebDAV Connectivity bundled plugin, which is by default enabled. If the plugin is disabled, activate it in the Plugins page of the Settings dialog. For more information, refer to Install plugins. Note that the plugin is available only for the Ultimate Edition of IntelliJ IDEA.

Last modified: 04 July 2024