Fix 'can't be larger than 64 kilobytes' errors

Have you encountered this error message while working on any pages within Shopify?

Error update failed 64kb

Below is a description of why this would occur as well as a work-around to prevent it from happening.

The Problem

In some rare circumstances, you may run into a situation where your page is larger than 64kb (64 kilobytes). First off, 64kb is a huge amount of textual data. To give some idea of what 64kb really means:

64KB = 64000 bytes = 64,000 characters (@ 1 character/byte). Or, more than 10,000 English words.

This is not a Shopify imposed limit, rather it is a mySQL database cell limit for TEXT data type. In the rare event that you have a page that must exceed this database limit, don't worry - we have a work around for you.

The Solution

In this situation, you must break up your data into smaller chunks and create an alternate page template for your special page to "glue" these chunks back together.

You can approach this in one of two ways:

  • Use multiple pages to show the content
  • Use multiple snippets to show the content.

Either way, the new alternate page template will be used to "glue" your content together.

Tip

If you use snippets you must create any HTML for display yourself. If you use a page the RTE will build the HTML for you but you may still need to check the mark-up in HTML view to make sure it is precise.

To get started:

  1. Create either your pages for your content or your snippets and make note of their names – you will need them to use in your template in order to "glue" them back together.

  2. Make a new template based on your page template. If you are unclear on how to do this, please read this page before proceeding.

  3. Once your special template has been created you need to call the broken up content into the template. For pages, your template will look something like this – using the page handles for each of your parts:

    
    <h1>{{ page.title }}</h1>
    {{ pages.terms-part-1.content }}
    {{ pages.terms-part-2.content }}
    {{ pages.terms-part-3.content }}
    
    

    If you are using snippets then your page code should look something like this:

    
    <h1>{{ page.title }}</h1>
    {% include 'terms-part-1' %}
    {% include 'terms-part-2' %}
    {% include 'terms-part-3' %}
    
    

Want to discuss this page?

Visit the Shopify Community

Ready to start selling online with Shopify?

Try it free