Intellij IDEA configures ftp to automatically upload code to the server

        Here is a brief record of some of the problems encountered in the process of learning tp6. For parsing the preface, it would undoubtedly be a wonderful thing if the code could be updated to the server and to the beta environment conveniently, simply, and in real time. Here is a brief introduction to my usage and configuration

1. Opening the port

        Generally, the port used by ftp is enabled by default, but you should check it to avoid being unable to upload due to port problems.

I am using an Alibaba Cloud server here, and the configurations of different servers may be similar. Note that if you use the Pagoda panel, be sure to check the security configuration items of the panel

The port here should correspond to the security group configuration of the cloud server. I have changed everything here.

2. Configure the fpt account . I will use the pagoda panel to explain here. The terminal command operation will not be explained here.

3, IDEA arrangement

 Fill in account data

 

 

4. Test upload

 if appears

 

 Try turning on passive

Generally, it will be successful after opening it. The premise is that the passive port is open. The opening method is similar to the first step.

If you don’t want to right-click each file and then upload it, you can turn on automatic upload, so that when you change the file and save it, the current file will be automatically uploaded to the target server. No additional operations are required, so that the local code can be reached in real time. Server code synchronization requires that you have uploaded the complete code and configured IDEA before changing the source code.

 Personal suggestion: If it is a beta environment and test server, it does not matter real-time changes and uploads, because it is a test environment. However, if you are updating directly and there is no beta environment, then it is recommended not to do this, at least after Test the link before uploading to avoid causing abnormal bugs on the website, or even 500.

        I will simply record it here. If there is anything wrong, please forgive me. I hope it can help you.

Guess you like

Origin blog.csdn.net/ITMyFavorite/article/details/130484535