Automatic upload to SFTP server fails after each PhpStorm restart: Default server is not valid

Problem

  • An SFTP server is configured under Settings | Build, Execution, Deployment | Deployment and is defined as the Default for uploading files.
  • After each PhpStorm restart, the files cannot be uploaded automatically to the SFTP server, and the remote server is not marked as Default.
  • The following notification may be shown on IDE startup: Default server 'XXX' is not valid: SFTP host is not specified. Please review your deployment settings .
  • In the Remote Host Tool window the host is displayed as disconnected.
  • The Deployment menu is grayed out in Tools > Deployment.
  • After clicking on the Test connection button in Settings | Build, Execution, Deployment | Deployment it becomes possible to upload files.
  • Disabling the Upload changed files automatically to the default server in Settings | Build, Execution, Deployment | Deployment | Options, and enabling it back throws SFTP host is not specified.

Cause

Mismatch between visibility settings in Settings | Build, Execution, Deployment | Deployment and in Settings | Tools | SSH Configurations. The issue appears when the deployment record is visible globally and the corresponding SSH configuration has project-only visibility.

Resolution

1. Open Settings | Tools | SSH Configurations.

2. Uncheck the Visible only for this project option for the corresponding SSH configuration:

3. Apply changes.

NB! Enabling the Visible only for this project option in both Settings | Build, Execution, Deployment | Deployment and Settings | Tools | SSH Configurations also works.

0 out of 0 found this helpful

Please sign in to leave a comment.

Have more questions?

Submit a request