Accessing Files on Web Servers
On this page:
- Accessing a server
- Creating a folder on a server
- Removing a file or folder on a server
- Renaming a file or folder on a server
- Moving a file or folder
Once you have set up synchronization between your local application sources and the application sources on a server, you can create new folders, move, rename, and delete existing files and folders. You can also compare files and folders on the server with their local versions.
Please note, that for the sake of simplicity any file or folder under the project root is referred to as local and any file or folder on the server is referred to as remote, even if the server is installed on your machine. For details, see Deployment. Working with Web Servers.
Although PyCharm supports direct editing of individual non-project files on servers, to keep your local and remote sources synchronized, configure automatic upload using the >Upload changed files automatically to the default server drop-down list in the Options dialog box.
Access to servers is controlled through server configurations of the type FTP, FTPS, SFTP, or Local or Mounted Folder.
Accessing a server
Open the Remote Host tool window. On the main menu, choose one of the following:
Select the required server configuration from the drop-down list. The tool window shows a tree view of files and folders under the server configuration root.
If no relevant server configuration is available in the drop-down list, click the Browse button
and configure access to the server in the Deployment dialog box that opens.
For details, see Configuring Synchronization with a Web Server.
Creating a folder on a server
Select the parent directory and choose Create Folder on the context menu.
Removing a file or folder on a server
Select the required file or folder and choose Delete on the context menu.
Renaming a file or folder on a server
Select the required file or folder in the tree view, choose Rename on the context menu, and specify the new name in the Rename dialog box that opens.
Moving a file or folder
- Select the file or folder and choose Cut on the context menu.
Select the folder to move the file or folder to and choose
on the context menu. Then confirm the changes in the
Move remote Items
dialog box that opens.
Alternatively, select the required file or folder and drag it to the new location. Then confirm the changes in the Move remote Items dialog box that opens.