WebStorm 2024.1 Help

Create a local server configuration

A local server is a server that runs in a local or mounted folder and serves files to a local URL address. In a local server configuration, you do the development in a WebStorm project, and then upload the project files to the document root on the server.

To create a local server configuration in WebStorm, you need to set up connection between WebStorm and the server and configure mapping between the WebStorm project and the project folder on the server and its corresponding URL path.

Create local server
  1. Press Ctrl+Alt+S to open the IDE settings and then select Build, Execution, Deployment | Deployment.

    Alternatively, go to Tools | Deployment | Configuration... in the main menu.

  2. The left-hand pane of the Connection tab, that opens, lists all the existing server configurations. Click the Add button and select Local or mounted folder from the list.

    In the Create new server dialog that opens, type the name of the new server and click OK to return to the Connection tab.

    Create a local server: select type
  3. Specify the server configuration root and the URL address to access it.

    1. In the Folder field, specify the absolute path to the server document root as defined in your server configuration file. Besides the document root itself, any other existing folder under the document root can also be specified.

      The document root is the folder from which the web server serves files to the web server URL.

    2. In the Web server URL field, the URL address (hostname and (optionally) port) mapped to the server document root in the server configuration file. This is the base URL for your application's web address. Both HTTP and the HTTPS protocols are supported.

      Click Browse in the right-hand corner of the field to open and check the provided web server URL.

      Both HTTP and the HTTPS protocols are supported.

    Specify the server configuration root and the URL address to access it
  4. Map project folders to folders on the server and the URL addresses to access them.

    In the Mappings tab, 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.

    1. In the Local Path field, the absolute path to the local project folder. WebStorm automatically fills out this field with the path to the currently opened project.

    2. In the Deployment Path field, a folder under the server document root where WebStorm will upload the contents of the project folder specified in the Local path field.

      If a folder with the specified name does not yet exist on the server, WebStorm will create it when you trigger project upload.

    3. In the Web Path field, the URL path configured for the folder specified in Deployment path. You can use a slash (/) to point to the root folder, or leave the field blank if the directory is not accessible from the web.

    Map project folders to folders on the server and the URL addresses to access them


In the Connection tab, mark the server configuration as default and configure its visibility.

  1. Click the Use as default button on the toolbar to mark the server as default.

  2. Use the Visible only for this project checkbox to enable reuse of this server access configuration in other projects.

    • Select the checkbox to restrict the use of the configuration to the current project. Such configuration cannot be reused outside the current project. It does not appear in the list of available configurations in other projects.

      The server configuration settings are stored in the .idea directory together with the project, which allows sharing them between team members through a VCS.

      In the list of server access configurations in the left-hand pane, the configurations visible only in the current project are marked with the Visible only in current project icon icon.

    • When the checkbox is cleared, the configuration is visible in all WebStorm projects. Its settings can be reused across several projects.

Last modified: 25 April 2024