Deployment: Mappings Tab
In this tab, configure mappings, that is, set correspondence between the project folders, the folders on the server to copy project files to, and the URL addresses to access the copied data on the server. The easiest way is to map the entire project root folder to a folder on the server, whereupon the project folder structure will be repeated on the server, provided that you have selected the Create Empty directories checkbox in the Options dialog box. "For more details, see Customizing Upload/Download. Below are definitions of terms used in this topic in the context of of synchronization between WebStorm and servers.
- A local server is a server that is running in a local or a mounted folder and whose document root is NOT the parent of the project root.
- A remote server is a server on another computer (remote host).
- The server configuration root is the highest folder in the file tree on the local or remote server accessible through the server configuration. For in-place servers, it is the project root.
- A local file/folder is any file or folder under the project root.
- A remote file/folder is any file or folder on the server, either local or remote.
Suppose you have a project
C:/Projects/My_Project/with a folder
C:/Projects/My_Project/My_Folderand a local server with the document root in
C:/xampp/htdocs. You upload the entire project tree to
C:/xampp/htdocs/My_Project. In the terms of WebStorm, the folder
C:/Projects/My_Project/My_Folderis referred to as local and the folder
C:/xampp/htdocs/My_Project/My_Folderis referred to as remote.
|Use this server as default||Click this button to have WebStorm apply the settings of the selected configuration by default during automatic upload of changed files. This button is only enabled for the non-default servers; for the server used as default, this button is disabled.|
|Local Path||In this text box, specify the full path to the desired folder in the project tree. In the simplest case it is the project root. Type the path manually or click Browse and select the desired location in the Choose Local Path dialog box that opens.|
|Deployment Path||In this text box, specify the folder on the server where WebStorm will upload the data from the folder specified in the Local Path text box. Type the path to the folder relative to the server configuration root. If the folder with the specified name does not exist yet, WebStorm will create it, provided that you have selected the Create Empty directories checkbox in the Options dialog box. For more details, see Customizing Upload/Download. The text box is not available for server configurations of the type In-place.|
|Web Path||In this text box, type the path to the folder on the server relative to the server configuration root. Actually, type the relative path you typed in the Deployment Path text box.|
|Add||Click this button to have a new line added to the list of mappings.|
|Remove||Click this button to remove the selected mapping from the list.|