Uploading and Downloading Files
The functionality described on this page and in the entire chapter Working with Web Servers: Copying Files is available only in the Ultimate Edition of IntelliJ IDEA.
On this page:
- Basics
- Uploading files and folders manually
- Uploading application sources automatically before application start
- Uploading changed files automatically
- Uploading checked-in files immediately after commit
- Suppressing automatic upload
- Downloading files
Basics
There are the following main ways to synchronize project files with their copies on the local or remote server:
- Manually, through a menu command.
-
Automatically, every time a file is updated.
In this case, the default server configuration is used.
You can additionally configure this upload method to have only manually saved files uploaded.
- Automatically, before launching the application or starting a debugging session. This method is available for PHP applications only,
- Automatically after the changes to the files are checked in to your version control repository.
Besides uploading files, you can also have IntelliJ IDEA download files that were deployed according to the default server configuration.
Uploading files and folders manually
Uploading application sources automatically before application start
When working on a PHP application, you can have its sources automatically uploaded to a server every time you run the application or initiate a debugging session from IntelliJ IDEA.
- During creation of a run/debug configuration, click the Add button and choose the Upload Files to Remote Host task from the list.
- In the Upload to Remote Host dialog box that opens, specify the following:
Uploading changed files automatically
IntelliJ IDEA considers a local file changed as soon as it is saved either automatically or manually. IntelliJ IDEA performs automatic save on a regular scheduled basis. Manual save is invoked by choosing on the main menu or pressing Ctrl+S.
-
Open the Options dialog box by doing one of the following:
- On the main menu, choose .
- Open the Settings / Preferences Dialog by pressing Ctrl+Alt+S or by choosing for Windows and Linux or for OS X. Expand the Build, Execution, Deployment node, and then click Options under Deployment.
- In the Upload changed files automatically to the default server drop-down list, specify when you want IntelliJ IDEA to upload changed files:
Uploading checked-in files immediately after commit
- Start checking in your changes.
- In the After Commit area, choose the target server from the Upload file to drop-down list. Choose one of the existing server access configurations or create a new one: click the Browse button and configure access to the relevant server in the Deployment dialog box that opens.
- To have IntelliJ IDEA automatically upload checked in files to the chosen server, select the Always use selected server check box.
Suppressing automatic upload
-
Open the Options dialog box by doing one of the following:
- On the main menu, choose .
- Open the Settings / Preferences Dialog by pressing Ctrl+Alt+S or by choosing for Windows and Linux or for OS X. Expand the Build, Execution, Deployment node, and then click Options under Deployment.
- From the Upload changed files automatically to the default server drop-down list, choose Never.
Downloading files
Choose on the main menu. Note that this functionality is available only if you have previously appointed a configuration as default.