PhpStorm does not sync with the server - phpstorm

Here's the problem :
My project on phpStorm use a remote access to the server by FTP.
When I save a modified file, the file is uploaded normally to the serv, but when I create a folder on the serv, i don't see it in phpStorm.
Any idea?

PhpStorm is built around "local project files are the main ones -- deployed are secondary" idea. It's natural to have "automatically upload to remote host" (sync local with remote) functionality to follow such an idea.
At the same time the IDE does not have anything to "automatically sync remote with local" (the reverse: to automatically copy remote stuff back to local). Simply because it contradicts such an idea: local files are the main ones.
Therefore:
The "Synchronize" button that you are referring to does not do what you are expecting it to do. It syncs what the IDE knows about project files on a local file system. In other words: it checks if there were any changes to local files done outside of the IDE. It does not do anything with remote files.
NOTE: In modern 202x.x versions it has been renamed to "Reload All from Disk" to avoid such a confusion).
To manually sync with remote files (any direction) you have these main options:
Use Remote Host side panel (can be accessed via Tools | Deployment | Browse Remote Host if it’s closed/hidden) and download any files or folders manually (drag and drop can also be used, just make sure that you are copying files because by default IDE tries to "move" (copy+delete) instead of just "copy"). It has a "Refresh" button to refresh the remote location.
Use two-way synchronisation (with preview) accessible via right click on desired folder(s)/files and choosing Deployment | Synch with Deployed... where you can sync those files/folders both ways (by default newer stuff will override older regardless of the direction).
The IDE can automatically sync one way (from local to remote): just ensure that automatic deployment is enabled and you have one server (or a group) marked as Default for this project.
Settings (Preferences on macOS) | Build, Execution, Deployment | Deployment | Options | Upload changed files automatically to the default server is the option. Check other options there to better suit your needs.
Please refer to the official help pages for more info on deployment (including a simple video tutorial): https://www.jetbrains.com/help/phpstorm/deploying-applications.html

And the funny thing about it, it is not completly correct. The option underneath is missing.. 'skip external changes' should not be ticked.
In Mac -> PHPStorm -> preferences -> Build, Execution, Deployment -> options
Set the Upload as seen in the picture to always and make sure skip external changes is unticked.

It works for me in PhpStorm 2020.1

Related

PhpStorm - Autodownload certain folders

I've set up PhpStorm to auto-deploy changed files to the vagrant box.
However, I run the build scripts in the box, and I can't count the times I shipped some module without copying back (downloading) those compressed JavaScript files, out of vagrant, into my local working directory.
Is there a way to make PhpStorm monitor the deployment server, and download changed files?
Is there a way to make PhpStorm monitor the deployment server, and download changed files?
There is no auto-download.
The IDE is build around "local code first" idea where local is the source and any remote is just a copy.
If you need to download remote stuff I suggest to manually use Sync With Deployed action from Deployment menu: it allows to manually sync files and folders both ways: https://www.jetbrains.com/help/phpstorm/deploying-applications.html
https://youtrack.jetbrains.com/issue/WI-1284 I guess (as it's about syncing remote to local)... Watch this ticket (star/vote/comment) to get notified on any progress.

Disable local changes toolbar in PhpStorm

How to disable the local changes toolbar in PhpStorm?
It shows up when working with remote files.
Unfortunately, there is no known way to disable it.
Technically, this toolbar reminds you that you are editing remote file and it is not automatically saved apart from local files.
You may want to configure deployment with automatic upload. In this way, you will always edit your files locally and these will be auto-uploaded on save action (by timeout or changing editor focus).
More about deployment:
https://www.jetbrains.com/help/phpstorm/creating-a-remote-server-configuration.html

Cannot get PhpStorm to compare deployed files folder with local

Am following:
https://www.jetbrains.com/help/phpstorm/2016.3/comparing-deployed-files-and-folders-with-their-local-versions.html
I have my server setup in the remote host, and can see my directory, folders and files.
I would like to compare a whole folder on my local machine with what is on the server.
It works for individual files, but my developer has changed a whole load of files in the directory.
Please see screenshots.
I try and compare a directory from Remote host to the local server (see screenshot)
Says I failed to download the content of the file (...name of folder) - see screenshot
I try and compare one file (screenshot)
Works fine
How do I compare an entire folder, and see what has been changed?
As per official documentation from the link you have provided:
https://www.jetbrains.com/help/phpstorm/2016.3/comparing-deployed-files-and-folders-with-their-local-versions.html#d30440e104
Comparing a remote folder with its local version
Open the Remote Host tool window.
Select the folder in question. Then choose Tools | Deployment | Sync with Local on the main menu or Sync with local on the context menu of the selection.
In the Differences Viewer for Folders that opens, explore the differences and synchronize the files, where applicable.
The same but when invoked from Project View panel:
https://www.jetbrains.com/help/phpstorm/2016.3/comparing-deployed-files-and-folders-with-their-local-versions.html#d30440e154
Comparing a local folder with its remote version
This action is available only if you have a default server access configuration appointed.
Select the folder in question in the Project tool window, and then choose Tools | Deployment | Sync with Deployed to on the main menu.
In the Differences Viewer for Folders that opens, explore the differences and synchronize the files, where applicable.
In that Differences Viewer for Folders screen you can:
See a list of files with differences (or that do not exist of one of the sides) -- top part;
Choose any file and see the actual difference/compare them -- bottom part;
Also choose to upload/download such file(s) or merge them manually.
(screenshot from JetBrains website)

Syncing project settings and FTP info in PHPStorm with VCS?

I work on multiple computers with different operating systems. One of the IDEs I use a lot is PHPStorm and I am looking for a nice solution to sync all of the files and all of the settings for the project. I am assuming that the project specific settings are in the .idea folder however the ftp settings are stored elsewhere.
What is the best way to sync ftp settings between multiple computers? Can this be done easily via VCS or is there another better option?
File | Export Settings... and then File | Import Settings... for manual sync.
The ordinary file sync (via any software) will do as long as it's the same OS/platform and all computers have similar folder structure (in terms of used tools, projects locations etc) -- that's mainly for settings that include references to 3rd party tools or list of recent projects etc. General settings (non path related) like "Live Templates" or "Color scheme" can easily be synced.
IntelliJ Configuration Server Plugin is definitely worth checking out -- http://plugins.jetbrains.com/plugin/4560?pr=phpStorm
As for project settings -- they are VCS-safe. Excluding workspace.xml, which is intended for use on that computer/user. https://intellij-support.jetbrains.com/entries/23393067-How-to-manage-projects-under-Version-Control-Systems

PHPStorm 7 not uploading files to mapped network drive automatically after SVN update

I'm experiencing strange PHPStorm 7 behavior - I'm using SVN, I have working copy on my HDD and I'm uploading data to mapped Drive in Windows 7 (when I update any directory, PhpStorm is not uploading files automatically to my network location (that's mapped drive in windows).
Also, sometimes it looks that I must upload same files manually twice to have it uploaded on my server. That's quite annoying.
Of course I've looked for some options, plugins or help on Jetbrains webpages, without success.
So the question is, why files are not uploading automatically and how to achieve it?
ver: 7.0, build: PS-131.374, JRE 1.7.0_10; VM: HotSpot srv; Windows 7 Pro SP1; 8 GB Ram PC;
Network is working fine.
**EDIT: I have automatic upload enabled. **
Thanks!
go to Tools -> Deployment -> Options and check the checkbox 'Upload external changes'.
Tada :)
1. Latest stable version is 7.1.3 -- consider upgrading from your 7.0
2. VCS changes are considered external changes, so unless you edit those changed files .. or configured to automatically upload external changes as well, they will not be transferred.
http://youtrack.jetbrains.com/issue/WI-2171 -- subscribe to that ticket (vote/star/comment) to get notified on progress.
Also, sometimes it looks that I must upload same files manually twice to have it uploaded on my server. That's quite annoying.
No clue -- you should check your idea.log (Help | Show Log in...) for possible hints / exceptions. Quite likely it fails to upload those files for some reason.