baao
baao

Reputation: 73241

PhpStorm working with multiple servers

I'm working on a project which is running on multiple servers with the same files on every server. I use PhpStorm and would like to upload the files on each of the servers like I now do for every single one.

Does anybody know if this is possible?

Upvotes: 7

Views: 3490

Answers (5)

Bakhtiyor
Bakhtiyor

Reputation: 7318

You can create Server group and move all your server items to the server group. Then with uploading to server group your file(s) will be uploaded to all server items on that group.

I have PhpStorm 2018.3.2 on MacOS and it has such a nice feature. Hope I can help you.

enter image description here

Upvotes: 6

Wil
Wil

Reputation: 837

If you set up multiple deployment servers and you use Git then you can deploy in real time to your development server and deploy commits to a second server by configuring a server to deploy to at commit time. I use this to live edit within local lxd instances, and then commit the working change sets to a staging server for verification ahead of release builds.

If you haven't already, install Git and create a local repo in your project folder

File->Settings->Build. Execution, and Deployment->Deployment

  1. create separate entries for your Dev and Staging servers
  2. modify their Mappings so each hits the correct deployment folder
  3. select your Dev server from the list of servers and click the to select it
  4. click [apply] and [ok]
  5. hack until you are happy with your update
  6. click the Git: on the toolbar to Commit to your local Git repo
  7. in the After Commit section, select your Staging server to upload files to
  8. check the [x] Aways use selected server checkbox
  9. click [commit]

Each time you commit the full change set will be synced to the Staging server.

Another thing you could do is configure a post-commit action in your git config to rsync the tree to any number of servers. That won't be on a per-save basis (which would be insane if you were developing and live-editing multiple production servers) but it will be on a per-commit basis (great for hotfix patches and config management of multiple servers.)

Upvotes: 0

ecmoechr
ecmoechr

Reputation: 9

configure TWO (s)ftp-servers with identical hosts and credentials BUT different mappings. You will have the chance to select one of them as default server and you'll get the chance to select the right server under (right-click) deployment->upload-to... (Strg-Alt-Umschalt-X) or default server. Seen in phpstorm 10 . . .

Upvotes: 0

user5607070
user5607070

Reputation:

If you set up "Deployment path on server ..." option under Mappings tab in

Tool -> Deployment -> Configure...

you can see more than one server when you choose

"Tools -> Deployment - Upload to ..."

. Works for me with phpStorm 10.

Upvotes: 0

LazyOne
LazyOne

Reputation: 165138

Currently it's not possible -- you can only have one (or none) deployment entry that can be set as Default for this project .. and automatic deployment works with default one only.

Same thing with manual -- only one at a time, unfortunately.

Star/vote/comment desired tickets to get notified on progress (as it stands right now, there is no movement in this direction).

Upvotes: 8

Related Questions