PhpStorm 2017.1 Help

Uploading and Downloading Files

On this page:

Uploading files and folders

PhpStorm provides the following main ways to upload project files and folders to a deployment server:

  • Manually, at any time through a menu command.
  • Automatically, every time a file is updated, or before starting a debugging session, or during commit to your version control system.

To upload a file or folder manually:

  • In the Project tool window, select this file or folder, choose Upload to on the context menu, and then select the target deployment server from the list.

To upload a file or folder to the default server manually:

  • In the Project tool window, select this file or folder and then choose Upload to <default deployment server> on the context menu of the selection.

To upload application sources automatically before every debugging session:

  1. Create a run/debug configuration of the required type.
  2. In the Before launch area, click /help/img/idea/2017.1/add.png and choose Upload files to Remote Host from the list.
  3. In the Upload to Remote Host dialog that opens:
    • From the Server list, choose the target deployment server.
    • In the Local roots to upload area, create a list of root folders to upload. All the folders and files under the specified roots will be uploaded recursively.

To upload checked-in files immediately after commit:

  1. Start checking in your changes.
  2. 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 browseButton.png and configure access to the relevant server in the Deployment dialog box that opens.
  3. To have PhpStorm automatically upload checked in files to the chosen server, select the Always use selected server check box.

To configure automatic upload of changed files to the default server:

  1. Open the Options dialog box: Open the Settings / Preferences Dialog by pressing Ctrl+Alt+S or by choosing File | Settings for Windows and Linux or PhpStorm | Preferences for macOS. Expand the Build, Execution, Deployment node, and then click Options under Deployment.
  2. In the Upload changed files automatically to the default server drop-down list, specify when you want PhpStorm to upload changed files:
    • To have PhpStorm upload any saved file no matter whether the save was invoked manually or automatically, choose Always.
    • To have PhpStorm upload only files that were saved manually, choose On explicit save action.
    • To suppress automatic upload, choose Never.

Downloading files and folders

To download a file or folder, select it in the Remote Hosts tool window and choose Download from here on the context menu of the selection.

To download a file from the default deployment server, choose Tools | Deployment | Download from <default server configuration> on the main menu.

See Also

Last modified: 5 May 2017