Phpstorm2020 automatically synchronizes the local code to the remote server in real time


When maintaining a website, you often encounter the need to modify the website code. Generally, you use SFTP to transmit it to the local area first, and then upload it after modification. Or you can edit the code directly on the server using the pagoda panel or windows server. If such an operation is a small change, it is no problem and very simple, However, if the modification is troublesome and needs constant debugging, it is a torture, so you have to think of a more trouble-free way. Today’s host notes introduce the use of phpstorm of JetBrains family to realize remote coding, and local editing is automatically synchronized to the remote web server in real time.

Let’s complete the operation according to the following steps!

1. Open phpstorm

2. First of all, we need to connect our local phpstorm project to the server. The best way is to use FTP to connect to our website or project. Phpstorm editor selects tools – deployment – configuration (or Ctrl + Alt + s shortcut key) and adds a remote host. The name is just for remarks. Write it casually. The protocol selects FTP (also supports SFTP (local, etc.)

3. Configure remote addresses and create connections. Click the + sign and fill in the information in the pop-up box. The main reason is that you can remember it in the future.

4. Configuring remote: SSH configuration

5. Fill in the remote account information and code placement directory

6. You need to configure the mapping remote address directory. Click OK to configure successfully.

7. After the configuration is completed, start uploading the code

Upload code when saving configuration

8. Check auto upload code

Then select tools – > deployment in the menu bar and check automatic upload, which means that the local code will be automatically uploaded to the remote server as long as changes are saved.

Well, it’s perfect. Let’s try it!!!!

This work adoptsCC agreement, reprint must indicate the author and the link to this article

Make programming a habit!

Recommended Today

Implementation example of go operation etcd

etcdIt is an open-source, distributed key value pair data storage system, which provides shared configuration, service registration and discovery. This paper mainly introduces the installation and use of etcd. Etcdetcd introduction etcdIt is an open source and highly available distributed key value storage system developed with go language, which can be used to configure sharing […]