There are two ways to transfer a file: ASCII mode and binary mode. One of them can quietly ruin your website.
Binary mode sends every byte exactly as it is. ASCII mode was designed for plain text, and it changes line endings so a file suits the operating system at the other end. That is handy for a text file moved between very different systems. It is a disaster for anything that is not text.
If an image, a zip file or a plugin archive goes up in ASCII mode, the changes corrupt it. The upload looks successful. The progress bar is happy. Then your logo appears as a small broken square, and your plugin refuses to install.
Modern clients mostly detect the correct mode automatically. In FileZilla, leave the transfer type on Auto, and for archives such as .zip and .tar.gz, choose Binary if you want to be certain. SFTP avoids the problem entirely, because it sends files as they are.
Treat this as a warning sign. If an uploaded image arrives broken, check the transfer mode before blaming WordPress, the plugin or the nearest intern.
Credit: Thank you to Claude for writing this filler content. It is an unsupervised learning task.
Leave a Reply