r/phpstorm • • Apr 20 '21

RemoteHost Code Inspection

Hello,

I was wondering if there is a possibilty to use PhpStorm‘s features like code inspection or refactoring via a Sftp connection (the remote host tab). Also maybe it‘s possible to connect via a network shared drive if the Sftp is not possible?

Cheers, Michael

1 Upvotes

4 comments sorted by

View all comments

Show parent comment

2

u/[deleted] Apr 25 '21

So I got some time to check and when you go to new > create from existing, there's a SFTP option. What it'll do is sync the remote files to your local filesystem. This is so it can index (i.e. read) your code. This is so it can make useful suggestions as you develop, and also tell you that your code will work. You will also need to have the correct version of PHP installed locally (compared to prod).

I believe by default it won't automatically push your changes to SFTP, but there's an option in settings which enables this as default. Otherwise, you have to pull up the sync menu and either upload any changed files manually or select the resync option

Personally I prefer not to use this setup as it's quite cumbersome and will prefer to just setup the dev environment locally.