Livereload Phpstorm

Posted : admin On 1/3/2022

PhpStorm has a built-in web server that can be used to preview and debug your application. This server is always running and does not require any manual configuration. All the project files are served on the built-in server with the root URL http://localhost:<built-in server port>/<project root>, with respect to the project structure.

To rectify this and since I don't use livereload (favor browsersync) I changed watch.js file line 30 livereload: true to liereload: false. If however you need to use livereload you may specify the port number so replace livereload: true to something like livereload: 12345. Please note I've not tested this method as I don't use livereload. Codota search - find any JavaScript module, class or function. On the Live Edit page that opens, select the Update application in Chrome on changes in checkbox. By default, PhpStorm shows on-the-fly preview only for HTML and CSS code. To enable Live Edit in JavaScript, select the JavaScript, HTML and CSS option. Sass stands with the protesters against police violence. We encourage our users to get in the streets and join them if you can. My temporary work-around has been installing the webpack-livereload-plugin using that, but every time I make a change the entire page reloads. I wish I could diagnose the problem madgnome December 16, 2016, 10:57pm.

The built-in server can only serve static content like HTML, JavaScript and CSS. To use it with PHP files, you need a local PHP interpreter specified for your project. When the interpreter is configured, PhpStorm will automatically start the PHP Built-In Web Server and redirect all PHP requests to it as soon as you run your PHP application. To run your PHP application, either open a file in the browser or create a dedicated run/debug configuration and launch it.

If a Deployment server is defined for this project and marked as default, the file will be served from this server instead. If necessary, you can still open the page via the PhpStorm built-in web server. To do this, open the desired browser and type the URL of the file with respect to the project structure, using http://localhost:<built-in server port>/<project root> as the root URL.

For more details on working with deployment servers, refer to the Deployment section.

Open a file in a web browser

To open a file that is intended to be rendered by a web browser (HTML, XML, JSP, and so on), do one of the following:

Webstorm Live Reload

  • Press Alt+F2.

  • Right-click a file and select Open in Browser.

  • From the main menu, select View Open in Browser.

  • Use the browser popup in the top right part of the editor window. Click the browser button to open the web server file URL, or Shift+Click it to open the local file URL.

The Open in Browser action is not available for other file types. However, you can still execute it using Find ActionCtrl+Shift+A.


You can also preview HTML and PHP files via the built-in preview in the dedicated editor tab.

Open the PhpStorm built-in preview

  • From the main menu, select View Open in Browser, and then select Built-in Preview from the list.

  • Alternatively, hover your mouse pointer over the code to show the browser icons popup, and click .

Configure the built-in web server

Livereload Phpstorm

To customize the parameters of the built-in web server, in the Settings/Preferences dialog Ctrl+Alt+S, go to Build, Execution, Deployment Debugger.


Use this spin box to specify the port on which the built-in web server runs. By default this port is set to port 63342 through which PhpStorm accepts connections from services. You can set the port number to any other value starting with 1024 and higher.

Can accept external connections If this checkbox is selected, then the files on the built-in server running on the specified port are accessible from another computer.
If this checkbox is cleared (by default), then the debugger listens only to local connections.
Allow unsigned requests

For security reasons, any request to a page on the built-in server from outside PhpStorm is by default rejected and the authorization popup is displayed.

To access the requested page, click Copy authorization URL to clipboard and paste the generated token in the address bar of the browser.

However this behavior may be annoying, for example, it may block your debugging session if manual intervention is impossible. To suppress displaying the authorization popup, select the Allow unsigned requests checkbox.

Use the PHP built-in web server on macOS

On macOS, you may get the php-cgi not found error when trying to use the built-in server. This indicates that PhpStorm is configured to use the PHP interpreter bundled with macOS, which does not contain the php-cgi module.

To be able to use the PHP built-in web server, do the following:

Webstorm Live Reload Not Working


Phpstorm Live Reload

  1. Install an alternative PHP interpreter with the php-cgi module included. The most common options are as follows:

  2. Appoint the newly installed PHP interpreter for use in PhpStorm as described in Configure local PHP interpreters.