How to Work With File Checksums

Checksums are alphanumeric character sequences produced by running files through an algorithm. They are especially helpful in verifying file integrity since small changes in files can result in significant checksum differences.

One example of a way checksums are helpful can be to ensure your backup files are uncorrupted. By doing so, you will gain an additional layer of security– if anything goes wrong with your site, you can restore it from files that are known to be undamaged.

Generating a Checksum

You can generate a checksum for any file by accessing the command line on your server. Use SSH to connect to your account (See “Connect to My Server With SSH”), then generate the checksum as follows:

md5sum file > checksum.txt

The above command will generate a checksum file called “checksum.txt” using the MD5 algorithm. Another commonly used checksum algorithm is SHA, a general term for a group of similar algorithms such as SHA-256 and SHA-512. 

SHA algorithms are denoted separately due to the varying length of the hash value’s bit length. For example, SHA-256 will be SHA with a 256-bit length.

How to Verify Checksums

Generating the checksum is only half of the job done. Once the file moves for any reason, it should be verified. To verify your file checksum, connect to your server again via SSH and type the following instruction;

md5sum -c checksum.txt

The result of this check will either be an “OK” or “FAILED.” Failed checksums mean there is a problem with the file integrity. While the difference may be minor, it can also be challenging to tell the exact problem.

If your file fails a checksum verification, you should discard the file and transfer a fresh copy. Then, you must rerun the checksum verification.

Was this helpful?

Do you want to make your WordPress/WooCommerce site lightning fast?

We guarantee to make your WordPress site load in less than 2 seconds on a managed VPS with ScalaHosting or give your money back. Just fill in the form below and we will get in touch with you.

Please enter a valid name
Please enter a valid website
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Do you want to learn how to grow your website in 2023?

An all-star team of SEO and web influencers are sharing their secret knowledge for the first time in years. You will learn about:

  • What is the future of SEO and how you can be ahead of the curve
  • Web Design best practices and why they matter
  • Secrets to getting the foundation for your website to thrive

An Exclusive Insiders Look Behind The SEO and Web Development Curtain


Working in the web hosting industry for over 13 years, Rado has inevitably got some insight into the industry. A digital marketer by education, Rado is always putting himself in the client's shoes, trying to see what's best for THEM first. A man of the fine detail, you can often find him spending 10+ minutes wondering over a missing comma or slightly skewed design.