Upload and download files
IntelliJ IDEA provides the following two ways to upload project files and folders to the configured deployment servers:
Manually, at any time through a menu command.
Automatically, every time a file is updated, or before starting a debugging session, or during a commit to your version control system.
tip
Use a temporary file name during uploadTo mitigate the risk of temporary data loss during upload of new versions of existing files, IntelliJ IDEA can store the contents of the uploaded file under a temporary name, and only rename it back after the upload operation has been successfully completed.
To enable this option, go to Settings (CtrlAlt0S) |Build, Execution, Deployment | Deployment | Options and select the Use a temporary file during upload checkbox.
For downloading files and folders, IntelliJ IDEA supports only the manual mode.
IntelliJ IDEA shows the logs in the File Transfer tool window.
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.
note
The FTP/SFTP/WebDAV Connectivity plugin is not available in IntelliJ IDEA Community Edition.
Press CtrlAlt0S to open settings and then select Plugins.
Open the Installed tab, find the FTP/SFTP/WebDAV Connectivity plugin, and select the checkbox next to the plugin name.
In the Project tool window (Alt01), right-click a file or folder, then select Deployment | Upload to from the context menu, and choose the target deployment server or server group from the list.
If the default server or server group is appointed, you can also select Upload to <default deployment server or server group>.
Switch to the Changes view (Alt00) to view the locally changed files.
Right-click a file, then select Deployment | Upload to from the context menu, and choose the target deployment from the list. If the default group is appointed, you can also select Upload to <default deployment >.
For more information, refer to Add files to Git and track changes.
Synchronize the contents of your local files with the VCS repository by pressing Ctrl0T or selecting VCS | <VCS> | Update from the main menu.
Switch to the Update Info tab of the Version Control tool window Alt09.
Right-click a file, then select Deployment | Upload to from the context menu, and choose the target deployment from the list. If the default is appointed, you can also select Upload to <default deployment >.
In the Changes view (Alt00), click to open the commit setting context menu.
In the After Commit area of the menu, choose the target server or server group from the Upload files to list. Choose one of the existing configurations or create a new one: click and configure access to the relevant server, or set up a server group in the dialog that opens.
To have your selection applied automatically in the future, select the Always use selected server or group of servers checkbox.
Proceed with committing your changes.
IntelliJ IDEA considers a local file changed as soon as it is saved either automatically or manually (File | Save All or Ctrl0S), see Save and revert changes. Changed files can be automatically uploaded only to the default deployment server.
Open the Options dialog by doing one of the following:
Go to Tools | Deployment | Options.
In the Settings dialog (CtrlAlt0S) , go to Build, Execution, Deployment | Deployment | Options.
From the Upload changed files automatically to the default server list, choose when you want IntelliJ IDEA to upload changed files:
To upload any manually or automatically saved file, choose Always.
To upload only manually saved files, choose On explicit save action.
To suppress automatic upload, choose Never.
If you enabled automatic upload, optionally configure the scope it should apply to:
Select Skip external changes to exclude local changes that were made using a third-party tool (a VCS, a script, and so on) from automatic upload.
Select Delete remote files when local are deleted to have IntelliJ IDEA automatically delete remote files during automatic uploads in case the local ones are deleted.
Note that this option serves as an extra safety measure and may result in unwanted files remaining on the remote server. As an example, consider a local file FILE.md, which is renamed to RENAMED.md. Since renaming a file is technically indistinguishable from deleting the file and creating a new one, the following will happen after automatic upload:
If the option is enabled, the remote server will only contain RENAMED.md.
If the option is disabled, the remote server will contain both FILE.md and RENAMED.md after automatic upload. You will probably need to delete FILE.md manually afterwards.
tip
Enabling the Upload changed files automatically to the default server option also enables Upload to default server in Settings | Tools | Actions on Save.
In the main menu, go to Tools | Deployment | Browse Remote Host.
In the Remote Host tool window that opens, select the required file or folder and choose Download from here from the context menu of the selection.
In the main menu, go to Tools | Deployment | Download from <default server>.
IntelliJ IDEA will prompt you to overwrite local files, if any.