D
D
Denis99992020-09-24 10:26:37
FTP
Denis9999, 2020-09-24 10:26:37

Functions.php file lost after saving via ftp?

I opened sublim text , the functions.php file was opened in the tab in it since yesterday, added one line, clicked save. As a result, WinSCP said that sending the file is not possible (something like that). As a result, I open the functions.php file and in it stupidly 1000 somewhere in the last lines are deleted.

After that, I closed all the tabs in sublime text, opened functions.php through an ftp client, added one line, pressed save, and 1000 lines from functions.php were also erased.

Why is this happening? This is my second time, the last one was a year ago.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Eugene, 2020-09-24
@Nc_Soft

This is due to an incorrect deployment system. It is impossible to edit files via FTP in production.
Set up git for development, and if hosting can only be uploaded via FTP, then make a script that will publish releases.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question