PhpStorm deletes all files in my project and on my remote server

Hi,

Occasionally when I press Command-S to save a file and automatically upload it to my remote server PhpStorm instead clears my remote server folder.

I am unsure if it could be connected to a finger slip and I pressed Command-D instead. It's very scary anyway even though I now know how to restore it all, but it's really annoying and if I'm not careful I may just lose my whole days work.

Could you please advise me how to stop this behaviour?

0
6 comments

Hi there,

I guess you must have "Upload changed files automatically..." option enabled .. plus "Delete target items when source ones do not exist" as well.

But that's for missing local files (file is present on remote but local was deleted .. so IDE also deletes remote to keep them in sync). I'm not aware of exact scenarios where IDE just deletes whole remote for no reason.

In any case -- if you think it's happening random:

1) enable extra logging.

2) disable auto upload and only upload changes manually

0

Hi there,

I have the same issue as Jenny had. Every now and then PhpStorm starts deleting files on my remote server, when I want to save a file with Ctrl+S. I definitly did not press Ctrl+D. The option "Delete target items when source ones do not exist" is disabled.

The logging is set to "#com.jetbrains.plugins.webDeployment" - but how can I find out what needs to be set to abandon this behavior?

0

All remote files are getting deleted or those that are missing locally?

Please attach a screenshot of your File | Settings | Build, Execution, Deployment | Deployment | Options

0

According to "https://www.jetbrains.com/help/phpstorm/settings-deployment-options.html" there should be a checkbox: "Delete remote files when local are deleted".

But I can't find it?

0

You must be running some old PhpStorm version. The docks you've linked are for the version 2022.1 (you can change the IDE version using dropdown selector in upper left corner).

I've launched version 2020.3 and the "Delete remote files when local are deleted" option was there.

0

Please sign in to leave a comment.