How to Fix Added Blank Line in Files Downloaded from FTP

Yesterday, I want to edit my css and php file in my webhosting. I use Filezilla as FTP client and Notepad++ as editor. When I try to edit the file, there is something weird with my file. All my downloaded files both css and php, gain extra blank line between every existing code line! I’m sure that my file doesn’t has this ‘extra blank line’ when I uploaded for the first time.

Blank Line error from downloaded file via FTP

After googling, I found the trick to fixed this issue. What you have to do is change transfer type from AUTO to BINARY. For detail, here is how to do it.

Fix empty lines in files downloaded from server

1. Open your Filezilla
2. Click Edit > Setting > File Type then Set Default Transfer type to BINARY.

Fixing blank line error in file

3. Click OK.
4. Re-download file from server and discard your previous local file.
5. Edit downloaded file with your favorite text editor. Mine is notepad++.

After setting default transfer type to binary, you should no longer have ‘blank line’ between code anymore in your downloaded files.

Fixed downloaded file from server

Speak Your Mind

*