Skip to main content

Connecting to site files via PhpStorm

Connecting to FTP in PhpStorm involves configuring a remote server and creating mappings for file synchronization. Here’s a detailed guide.

Configure FTP/SFTP

Launch PhpStorm. Open the project you want to configure connection for, and go to "File" → "Settings".

Configure FTP

Add a new server by navigating to "Build, Execution, Deployment" → "Deployment" in the settings. Click the "+" icon and select "FTP" or "SFTP" if using a secure connection. Enter the server name and click "OK".

Configure FTP2

"Connection" tab:

  • Host: Enter the server IP address.
  • Port: 21 for FTP, 2222 for SFTP.
  • User name: Enter the FTP/SFTP username.
  • Password: Enter the FTP/SFTP password.
  • Select "Passive mode" if needed (useful for bypassing network restrictions).
note

You can learn about creating FTP accounts in FASTPANEL® in this article and about SFTP accounts in this one.

Click "Test Connection" to verify the connection. If successful, a message will appear: Connection successful.

Configure FTP3

Go to the "Mappings" tab. Specify the "Deployment Path": the directory path on the server where files will be placed (e.g., /).Close the settings window by clicking "OK".

Configure FTP4

Working with Files

To download files from the server, right-click on the project or file → "Deployment" → "Download from [Server Name]". To upload files to the server, right-click on the project or file → "Deployment" → "Upload to [Server Name]".

Work with Files

To enable automatic upload of changes go to "Tools" → "Deployment" → "Automatic Upload" → "Always".

Install extension