Creating a Project from Downloaded Files
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.
Creating a WebStorm project around files from a remote host or accessible through network or mounted drive
- To start the New Project wizard, choose New Project from Existing Files 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. See Customizing Upload/Download for details.
- 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, see Creating an in-Place Server Configuration for details.
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, see Creating an in-Place Server Configuration for details. 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 click Next.
To make sure that the specified URL address ensures successful connection to the server, clear the Don't check HTTP connection to server check box. Both the HTTP and the HTTPS protocols are supported.
To access a server through HTTPS, you need to acquire a certificate file
<certificate_name>.certsigned by a recognized authority and import this certificate in the truststore/keystore of the Oracle JRE (Java Runtime Environment) on which WebStorm runs. Note that self-signed certificates are rejected as unsafe.
To import a certificate in Oracle JRE:
Open the embedded Terminal and type the following command:
If you are using the Oracle JRE bundled with WebStorm, the default path to the truststore/keystore is
<jre_home>/bin/keytool.exe -importcert -keystore <path to jre truststore/keystore> -file <full_path_to_<cert_name>.cert>
Otherwise it is
When asked to enter a password for the truststore/keystore, specify the default one
WebStorm.exe.vmoptionsfile in the
<WebStorm_installation_folder>/binand add the following line to it:
-Djavax.net.ssl.keyStore=<path to keystore>
- Restart WebStorm.
If the Don't check HTTP connection to server check box is selected, WebStorm moves to the next page of the Wizard without any connection check.
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.