Home > Backend Development > PHP Tutorial > How to use web/phpstorm to automatically synchronize local code to a remote server (picture and text)

How to use web/phpstorm to automatically synchronize local code to a remote server (picture and text)

不言
Release: 2023-04-05 18:00:02
forward
4843 people have browsed it

The content of this article is about how to use web/phpstorm to automatically synchronize local code to a remote server (pictures and texts). It has certain reference value. Friends in need can refer to it. I hope it will be useful to you. helped.

Scenario: If the development and testing environments are different, or the machine used frequently is Windows, the project requires liunx. At this time, I choose to install liunx on the virtual machine, deploy the ssh service, install winscp on the host with putty, and use webstorm for development. For the current mainstream webpack hot compilation of the web front end, it is really tiring to transfer files to the virtual machine from time to time, so I chose the automatic synchronization of the tool.

Settings

Configuration basic information

Select Tools – Deployment – ​​Configuration in the webstom editor, add a remote host, this name is just for notes, write whatever you want, select the protocol FTP (also supports SFTP, local, etc.)

How to use web/phpstorm to automatically synchronize local code to a remote server (picture and text)

How to use web/phpstorm to automatically synchronize local code to a remote server (picture and text)

At this time, the main thing is to fill in the FTP information of the remote host, in addition to the basic FTP information In addition to filling in, you also need to fill in the following information:

Root path  //这个选项是要打开的路径,这样做主要是为了防止误操作影响项目,填写后上级目录不会展示,当然你可以不写

Web server root URL   //这里就是调试的网址
Copy after login

In addition, you need to configure the file mapping between local and server, as shown in the figure below:

How to use web/phpstorm to automatically synchronize local code to a remote server (picture and text)

Finally , we can then adjust the mapping between local and remote hosts. If you want to add multiple remote hosts, remember to click Use this server as default on the item you want to use.
After the remote host is configured, we can take a look at the directory structure. Click Tools – Deployment – ​​Broswse Remote Host, and then you will see the remote files.

Set up synchronization

How to use web/phpstorm to automatically synchronize local code to a remote server (picture and text)

But to achieve synchronization at this time, manual transmission is still required. It is still a little short of automation. Open Tools – Deployment – ​​Options. We changed the Upload changed files item to On explicit save action, which means that each save will be synchronized to the remote server.

How to use web/phpstorm to automatically synchronize local code to a remote server (picture and text)

This article has ended here. For more other exciting content, you can pay attention to the PHP Video Tutorial column on the PHP Chinese website!

The above is the detailed content of How to use web/phpstorm to automatically synchronize local code to a remote server (picture and text). For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:segmentfault.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template