PhpStorm - working on a remote server - phpstorm

I have never used PhpStorm before for remote development because I used to work locally.
I am wondering if there is a method to set PhpStorm to work in such a way so it will be identical, in terms of functionality, to local development?
At least, debugging and jumping to functions/variables declaration across the whole project?
Tried to google it but found nothing. Maybe someone knows?

There are two ways to work with remote server development :
With a physically server
With a Virtual Machine locally
Those 2 ways are identical workflow parameters for working with this.
In PHPStorm the main area for parameters workflow deployement on remote server is : PHPStorm > Settings > Build, Execution, Deployement > Deployement
In this area you config the connection on your remote server (you before must config access on your remote server). SFTP is the best way to use this connection.
Most important to select where you want to send/push your modified code with Root path. Upload manually or use the sync auto functionality of PHPStorm use this parameter.
Mappings tabs is not very important you can keep this without change except for 'Deployement path on server' which just type '/' character if you have selected the good 'Root Path' in tab before.
For starting you can forget the Excluded Paths tab. after if you work on symfony framework you use this to exclude the vendor directory.
Don't forget to set the options 'use as Default' if you want to upload or sync auto more fastly and friendly.
Now you must parameters and config correctly your remote server for server be able to run the code which send it with PHPStorm. Dependly on your framework or other technologies you use.
Finally you have :
PHPStorm config OK for send correctly your modification code (auto or manually)
remote server config OK for executing and running correctly the code you are before sending from PHPStorm to your server remote
WARNING : you never run your website into your local OS.
IMPORTANT : config a web server on your remote server and don't forget to install layer for PHP executing script.

Related

What is the point of in-place server configuration in PhpStorm when server files are both local and remote at the same time?

What is the point of in-place server configuration in PhpStorm, when as defined in the docs in in-place server configuration:
The web server is running on your computer, your project is under its document root (for example, in the /htdocs folder), and you do your development directly on the server.
So, what is the point of making a server connection when I'm directly editing/using the files from my server, and they are both local and remote at the same time?
Also, I've set up everything according to the docs for in-place server, and I can't find any server when I open remote hosts window.
With this server connection setup, you can tell the IDE to preview your files on your in-place web server instead of the IDE built-in webserver (http://localhost:63342) when you click the browser icon on the browsers bar

Pulling remote changes from a development server in PhpStorm

For most projects, I work in a local Dockerized setup, but once in awhile, I have to work on a project that lives on a remote development server. Using tools > deployment > configuration, I have set up sftp access to the server.
Now I can't seem to find a way to download the relevant files from that server.
I could swear that there used to be a menu option under Tools > Deployment to do this. Something like pull files from server.
Did this option go away with a recent update? Is there another way to do this from within the IDE (preferably without pushing to version control every time I want to test a change)?
===
Edit: I am using PhpStorm 2019.2. The contents of the Deployment submenu are:
Configuration
Options
Automatic Upload
Browse Remote Host
I have tested the sftp connection from within the configuration screen in PhpStorm, and it is working. Browse Remote Host also appears to work.

Error while setuping CodeSniffer in PhpStorm with remote interpreter

I have setup remote interpreter with php7.2. Now I want to setup remote CodeSniffer. I have setup it remotely with pear. However now I PhpStorm does not allow me to select remote interpreter. It shows the following:
CodeSniffer is saved in IDE settings, but selected interpreter is defined in Project settings. Please, select another interpreter or change visibility for this one.
I wonder how I can change visibility for CodeSniffer. Is it possible to use remote remote CodeSniffer at all?
Code Sniffer settings and bound remote interpreter settings should be stored on the same level of settings (project or application) in order to keep PhpStorm settings in consistent state.
Unfortunately, till PhpStorm 182.2371 there was a limitation which doesn't allow to store PHP Code Sniffer/Mess Detector settings on project level (please see details in corresponding issue WI-19525), so there was no way to bind PHP Code Sniffer/Mess Detector to interpreter defined on project level settings and this error message appeared.
Please update your PhpStorm version, it should work fine starting from PhpStorm 182.2371

How to simulate remote host deployment with PhpStorm?

Some FTP clients, such as Transmit, offer an option to simulate the synchronisation between a local and a remote directory. Basically what it means is, that you get a list of files that would be changed, instead of actually moving the files.
I was hoping to find such an option in PhpStorm's Remote Host Plugin, but I searched for it to no avail. Did I overlook something, or does this not exist (yet)?
PHPStorm can sync with the deployed version if the remote host has been configured. It shows the difference and you can select what to do with each file. See PHPStorm Documentation

Install of Bolt CMS on Windows

I have installed the Bolt CMS on a Windows 2008 R2 server and it shows me a blank screen when I first try to launch it. I'm using IIS as the web server and MySQL as the database. I have verified that file permissions are set correctly for the folders that should be writable. PHP is also configured and working, and I have created my database and put the connection details into the config-yml-dist file. From my understanding the config.yml-dist file should be automatically renamed to config.yml when I run the application for the first time, but that isn't happening, in case that helps to know.
Can someone confirm if Bolt is compatible with Windows, and if so, provide any input on what I can check next?
Thanks.
I know a few websites with Bolt running on IIS / Windows 2008. If you're getting a blank screen, that means PHP is configured to not display errors. Which is the preferred setting for production servers, but not very convenient for development.
Either edit the php.ini file to 'display errors', or look in the server's error log for error messages. That should hopefully tell you what's going on.