11

I currently use Komodo and work directly off a remote server. I have just discovered phpstorm and I want to start giving this a go.

My question is, how can I work off a remote server like in Komodo? I really couldn't understand how to do it!

Becs Carter
  • 1,250
  • 1
  • 12
  • 27
  • 3
    You cannot. PhpStorm requires local copy of the files to be present (as it needs to index them to be useful: code completion etc). You can map your remote server as network drive (on Windows .. or whatever it's called on Linux/Mac) but it is not officially recommended way: it will be slower, IDE may freeze in some moments (as IDE requires fast access to source files) etc. The best solution here is to setup local copy of the project (using New project Wizard for example) and setup automatic upload of changed files back to server (FTP/SFTP/FTPS). – LazyOne Jan 14 '13 at 02:13
  • I have not tried with PHPStorm however I do use ExpanDrive (http://www.expandrive.com/) with some of our legacy apps. I just mount the FTP as a local drive and then just open the drive up as a directory/project in Sublime. Don't see why it wouldn't work in PHpStorm either :) it's a paid app though. I can even hit cmd+p and search through files although this is slower than having a real local copy. – fl3x7 Oct 01 '14 at 15:26

3 Answers3

4

As @LazyOne commented, it's not possible right now. You can vote for the related feature request.

CrazyCoder
  • 389,263
  • 172
  • 990
  • 904
4

PhpStorm (as of 7.1) does not support working directly on a remote server.

You should vote for the feature here as @CrazyCoder mentioned.


A temporary alternative for SFTP

You can use a SSHFS mount to work directly on files on a remote server. It isn't ideal, but I found it works ok.

I use the follow command and settings (on a mac).

To mount:

sshfs -o IdentityFile=~/.ssh/id_rsa root@xxx.xxx.xxx.xxx:/ ~/sshfs_mounts/example -oauto_cache,reconnect,defer_permissions,noappledouble,volname=example

To unmount:

umount ~/sshfs_mounts/example

For more info see http://benohead.com/mac-os-x-use-sshfs-to-mount-a-remote-directory-as-a-volume/

Andy Fleming
  • 7,655
  • 6
  • 33
  • 53
  • This is how I work but as mentioned in the first comment there are a few glitches now and again and it is slightly slow. However, I can live with these minor problems and the benefits are worth it, especially the VCS integration. – camden_kid Oct 31 '14 at 09:54
  • Please note noappledouble, defer_permissions and volname seems to be Mac OS X only options. Debian and FreeBSD: -oauto_cache,reconnect – Dereckson Nov 22 '14 at 04:13
2

phpstorm has two very useful features to work with remote servers.

  1. when you commit, it can automatically deploy/upload to the remote location (sftp, ftp).
  2. when you commit you can also push to remote location git or other vcs.

It is correct as mentioned, phpstorm needs the local copies of the code aswell.

Joel Box
  • 429
  • 1
  • 6
  • 12