Web preview

I'm running PhpStorm 2.1.12 on OS 10.6.8. I am running the built-in Apache server, have enabled PHP and MySQL and set up my development folder to match my remote server's directory structure.

When I create a new project from existing files, the files are successfully copied from the server to the local environment. But when I open a local HTM file for changes and then choose "Web preview" it loads and shows the unchanged remote file instead.

I thought that PhpStorm will load the recently modified local file into Safari/Firefox and allow me to see the changes before deploying it to the remote server. It's possible to navigate to the directory where the files exist and double-click on it to launch another Safari/Firefox window, but shouldn't PhpStorm launch the local version?

Example: The local file is at "Volumes/Data-X/Users/mdavis/Sites/wsdb/public_html/index.htm" and yet when I click "Web preview" the browser launches and shows "http://wsdb.com/index.htm" which is the live site. (Note: I changed the site name to protect my client as the site is very ugly. :) )

Is there a preference or configuration option to allow PhpStorm to load and view the local file in a browser?

Comment actions Permalink

Currenly PhpStorm always opens the remote URL if 'Web path' is specified in Settings | Deployment for your server. I don't think that adding an option 'open local file' is a good solution for this problem because sometimes users really need to open the remote URL and it wouldn't be convenient to switch this option. Instead we're going to improve 'Open in browser' action by adding 'shift' modifier to it: if 'shift' is pressed when user clicks on the action icon the local file will be opened.

Comment actions Permalink

Thanks. I like to preview my changes locally before uploading them to the remote server.

By removing the web path I was able to enable the ability to preview local files.

Again, thanks.


Please sign in to leave a comment.