Project with local files that are synced to remote server on save?
I've been searching around for how to do this, but I'm struggling to understand.
I would really like to be able to create projects in PhpStorm on my local machine where I have a few files that sync to specific directories on the remote server when I save them.
Local files
- first.php
- second.php
- config.php
Sync locations on the remote server:
- custom/module/first.php
- custom/module/deeper/directory/second.php
- custom/config.php
Either like that or simply mirror the directories on in the local project directory like this:
Local files
- custom/module/first.php
- custom/module/deeper/directory/second.php
- custom/config.php
Sync locations on the remote server:
- custom/module/first.php
- custom/module/deeper/directory/second.php
- custom/config.php
So whenever I save any of these local files, they would be immediately synced to the remote server.
Any advice on this please? Or alternatives?
请先登录再写评论。
Hi there,
Well ...
1) enable "Auto upload" option if you need it to be automatic
2) specific mapping can be set on the Mappings tab for that specific Deployment Entry -- the interface allows you to choose folders only .. but you may simply type the path to exact file manually. See this thread for example: https://intellij-support.jetbrains.com/hc/en-us/community/posts/115000151910-Deploying-Files-with-a-Different-Extension
Obviously, it only works for modified files. I mean -- if you want to make so when one file is changes and all 3 gets uploaded -- nope.
Second "obviously" -- it's upload only (local to remote). There is no "automatic download" here in this IDE.
P.S. If you have folder structure mirrored .. then what's the problem here at all (considering that only modified files will be uploaded)?