From time to time, you may need to update externally created and uploaded to a remote host with access through the FTP/SFTP/FTPS protocol, network share, or mounted drive. WebStorm does not support direct editing of files on remote hosts. Therefore to work with remote sources in WebStorm, you need to download them and arrange them in a WebStorm project. To keep your local and remote or shared sources synchronized, you can configure automatic upload using the Upload changed files automatically to the default server drop-down list in the Options dialog box.
WebStorm interacts with the remote host where the files are located according to a server access configuration. You can use an appropriate existing configuration or define a new one during project creation.
- To start the New Project wizard, choose on the main menu.
On the Choose Your Scenario, page of the wizard, specify the method to access the files. Do one of the following:
- To have WebStorm download the remote files via network or from a mounted drive, choose Web server is on a remote host, files are accessible via network share or mounted drive.
- To have WebStorm download the remote files via the FTP, FTPS, or SFTP protocol, choose My web server is on a remote host, files are accessible via FTP/SFTP/FTPS.
Click Next when ready.
On the second, Specify Local Path, page of the wizard,
specify the future location of the project on your computer and choose the download strategy to use:
- Appoint the parent folder to create the project folder in. Type the path to it manually in the Project local path text box or click the Browse button and select the desired location in the Select Path dialog box that opens.
- Specify the project name in the Project name text box. As you type, the name is added to the project path.
Choose the download strategy in the Deployment options area.
- To have WebStorm download the files according to the settings specified in the Options dialog box on the Deployment page, click the Default option.
- To customize the default settings, click the Custom option and change the settings in the Create New Project: Review Deployment Options dialog box that will open when you click Next.
- Click Next when ready.
On the Add Remote Server page, create a server access configuration
to enable interaction between WebStorm and the remote host or mounted drive where the files are located.
If you already have at least one server access configuration, WebStorm brings you to the Specify Remote Server page. Just skip this step.
On the Specify Remote Server page, choose the server access configuration
according to which WebStorm will interact with the remote host. Do one of the following:
- To use an existing configuration, click the Use existing server option and select the configuration from the list. The list also shows the main access settings.
- To define a new configuration, click the Add new remote server option and create the configuration, as described in the previous step. The Add Remote Server dialog box will open, when you clickNext.
On the Choose Remote Path page, configure the structure of the project to be created.
The page shows a tree view of folders under the server configuration root.
- Specify which remote folder will become the project root. Select the relevant folder and click the icon on the toolbar or choose Project Root on the context menu of the selection. WebStorm marks the selected folder with the icon.
Under the project root, specify the folders that you do not need downloaded for some reason. These can be sources that you should not update at all, media, caches,
temporary files, that you actually do not need in your work.
Select the relevant folder and click or choose Exclude Path on the context menu of the selection.
Exclusion is applied recursively. This means that if the selected folder contains subfolders they are automatically marked as excluded as well.
Configure the folders under the project root.
By default, all the files in this folder are treated as sources and are involved in indexing, searching, parsing, code completion, etc.
To change this status, folders can be assigned to the following categories:
Select the folder in question and assign the desired status to it:
- To enable WebStorm to complete relative paths to resources under the selected folder, click the Resource Root toolbar button or choose Resource Root on the context menu of the selection.
- To have WebStorm ignore the selected directory during indexing, parsing, code completion, etc., click the Excluded from Indexing toolbar button or choose Excluded on the context menu of the selection.
To return a folder to its regular status, select the folder in question in the list of folders under the content root, and click . Alternatively, select the folder in question in the tree and click the status icon once more.
Language and Framework-Specific Guidelines:
- Working with Web Servers: Copying Files
- Excluding Files and Folders from Upload/Download
- Configuring Folders Within a Content Root