PhpStorm 2026.1 Help

WSL

WSL (WSL 2) – Windows Subsystem for Linux – is a compatibility layer for running Linux binary executables natively on Windows 10 and later. Currently, it supports several Linux distributions, such as Ubuntu, OpenSUSE, and SLES.

Configure WSL

  1. Download and install a WSL distribution (for instance, Ubuntu) from Microsoft Store on your Windows machine.

    For this step, be sure to use at least Windows 10 or later with the latest “Fall Creators Update” (minimum version 1709, build 16299.15). See the official guide Install the Windows Subsystem for Linux for instructions.

    To work with WSL 2, your Windows version should be 10 build 18917 or later. Follow these instructions to switch the distributive.

    Note that PhpStorm does not support legacy WSL, which you may have installed before upgrading your system to the build 16299.15 or later of Windows 10. In this case, you need to update your WSL distribution.

  2. Run the Linux distribution.

    Upon the first launch, the system may prompt you to enable the Windows optional feature. In this case, you need to do the following:

    • Open Windows PowerShell as Administrator and run

      Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
    • Restart your computer.

  3. Inside the Linux installation, make sure PHP is installed. For the detailed installation instructions, refer to Debian GNU/Linux installation notes. If you are using Ubuntu, you can run this command in the Terminal to quickly install PHP:

    sudo apt install php php-mbstring php-xml php-zip php-curl php-xdebug

Configure a remote PHP interpreter for WSL

  1. Install and run PhpStorm locally on Windows as you normally would.

  2. Press Ctrl+Alt+S to open settings and then select PHP.

  3. On the PHP page that opens, click the Browse button next to the CLI Interpreter list.

  4. In the CLI Interpreters dialog that opens, click the Add button in the left-hand pane, then choose From Docker, Vagrant, VM, WSL, Remote... from the popup menu.

  5. In the Configure Remote PHP Interpreter dialog that opens, choose the WSL method and provide the connection parameters:

    Remote interpreter via WSL dialog

    Field

    Description

    Linux distribution

    Choose one of the installed Linux distributions to use from the drop-down list.

    PHP interpreter path

    Specify the location of the PHP executable file in accordance with the configuration of the selected remote development environment.

    • For WSL, PhpStorm by default suggests /usr/local/bin/php.

    To specify a different folder, click Open and choose the relevant folder in the dialog that opens. Note that the PHP home directory must be open for editing.

  6. Click OK. PhpStorm checks whether a PHP executable is actually stored in the folder specified in the PHP interpreter path field.

    • If no PHP executable is found, PhpStorm displays an error message asking you whether to continue searching or save the interpreter configuration anyway.

    • If the PHP executable is found, you return to the CLI Interpreters dialog where the installation folder and the detected version of the PHP interpreter are displayed.

    • Selecting the Visible only for this project checkbox restricts the interpreter's availability only to the current project.

    • Clicking the Show phpinfo button next to the PHP executable field opens a separate information window with the installation details and the list of loaded extensions and configured options.

You can now select the WSL-based PHP interpreter from the list of configured PHP interpreters for all common tasks: executing scripts or Composer commands, running PHP Quality tools, and so on.

Ps select php interpreter wsl

You can create a project and store it in the WSL environment, open one from the WSL file system, and develop your projects further in WSL.

Create a new project in the WSL file system

  1. Install and run PhpStorm locally on Windows as you normally would.

  2. On the welcome screen, click New Project.

  3. On the page that opens, select a type of the project you want to create.

  4. In the right pane, specify the path to the project in the Location field. The project location for WSL will show the absolute path starting with \\wsl$ to the WSL file system.

    New Project: project sdk
  5. Click Create.

    PhpStorm creates a project located in WSL and you can develop and build your project inside the WSL environment without leaving the IDE.

Open a project stored in the WSL file system

In PhpStorm, you can directly open a project stored in the WSL file system and work with it like with any other project.

  1. Click Open on the Welcome screen or select File | Open from the main menu.

  2. In the Select Path dialog that opens, select the folder in the WSL file system that contains the project to open, or type the path to the project location manually.

    The path syntax is \\wsl.localhost\DistributionName where DistributionName is the name of your Linux distribution such as Ubuntu, Debian, Arch, and so on.

    Opening a project stored in the WSL file system
04 June 2026