Exclude files and folders from uploading and downloading
Suppressing uploading, downloading, and synchronization for files or folders with sources ensures that the sources are protected against accidental update. When applied to non-sources, it can save system resources because media, caches, or temporary files are no longer copied unnecessarily.
You may need to suppress upload/download in the following cases:
You are going to work with externally created and uploaded source code. To process these remote sources in WebStorm, you have to download them and arrange them in a project. However, there are some sources that you should not update at all. On the other hand, the folders on the remote host also may contain huge amounts of media, caches, temporal files, that you actually do not need in your work.
You have already downloaded the data from the server and arranged them in a WebStorm project. However, for this or that reason, you need to have some files or folders on the server protected against upload/download, for example, to prevent accidental overwriting.
The local copy of an application contains both source code and other data that you do not need to upload. Besides, you want to protect some sources against overwriting by mistake. In this case, you can suppress upload/download for all files and folders that should not be uploaded.
There are two ways to exclude folders from upload/download:
Explicitly, by marking the corresponding paths as excluded in the Remote Host tool window or in the Excluded Paths tab of the Deployment dialog.
The names of all the not-excluded folders and files are displayed on green background. The names of excluded items are displayed without background.
In the Remote Host tool window, you can exclude both entire folders and specific files.
By name, that is, by specifying patterns that determine the names of files and folders to be excluded in the Exclude Items by Name field of the Options dialog.
Exclude a folder on server from upload/download after project creation
Add a folder to the list of excluded paths
Open the Deployment dialog by doing one of the following:
Choose
from the main menu.In the Settings/Preferences dialog Ctrl+Alt+S, select Deployment under Build, Execution, Deployment.
In the Deployment dialog, click the Excluded Paths tab. The tab shows the list of the previously excluded local and remote folders.
Click the Add button and select Deployment path.
Double-click the empty line that is added to the list.
At the end of the added line, click the Browse button .
In the Choose remote excluded path dialog, navigate to the folder that you want to exclude.
You can also type the path manually, but note that only absolute paths are accepted.
When you OK, you return to the Excluded Paths tab, where the selected remote folder is added to the list.
Add a folder to the list of excluded paths in the Remote Host tool window
From the main menu, choose
or .In the Remote Host tool window that opens, select the relevant server configuration from the list.
Select the folder to exclude and choose Exclude Path from the context menu of the selection.
Exclude a local folder from upload/download
Open the Deployment dialog by doing one of the following:
Choose
from the main menu.In the Settings/Preferences dialog Ctrl+Alt+S, select Deployment under Build, Execution, Deployment.
In the Deployment dialog, click the Excluded Paths tab. The tab shows the list of the previously excluded local and remote folders.
Click the Add button and select Local path.
At the end of the added line, click the Browse button and navigate to the folder that you want to exclude.
You can also type the path manually, but note that only absolute paths are accepted.
Exclude files and folders from upload/download by name
Open the Options dialog by doing one of the following:
From the main menu, choose
.In the Settings/Preferences dialog Ctrl+Alt+S, go to .
In the Options dialog that opens, specify the patterns that define the names of these files and folders in the Exclude items by name field.
Use semicolons
;
as delimiters, asterisks*
to match zero or more characters, and question marks?
to match a single character.For example, if you have a folder stylesheets with three files style.css, style1.css, and style2.scss, then
style*
excludes the entire folder,style?.css
excludes style.css, andstyle?.*
excludes style1.css and style2.scss.Learn more from Regular-Expressions.info.
The exclusion is applied recursively. This means that if a matching folder has subfolders, the contents of these subfolders are not deployed either.
Remove the exclusion mark
Select a file or folder to upload/download and choose Remove Path from Excluded from the context menu.
Returning a folder to upload/download affects all its subfolders and files.