Updated for Divi 5: Divi 5 still shows this error with exactly the same wording, and the fix is still the same: import the file in the place it was exported from. The import buttons moved in Divi 5, so every step below shows the Divi 5 path first and the Divi 4 path next to it.
Have you ever tried to import a JSON file into Divi only to be met with the frustrating notification saying: “This file should not be imported in this context”? Whether you tried to import a free layout from somewhere else or a layout you have exported yourself, this error might have appeared and made quite a snag in your plans.

But no worries! Today, I’ll tell you exactly why this happens and how to fix it if it does. I’ll also share a nifty little trick that will help you avoid seeing this error ever again!
And psst! I know how annoying it can be to read a full explanation if all you need is a simple, quick fix. If you want the TL;DR version of the solution, scroll down to the last section, The quick fix.
What does “This file should not be imported in this context” mean?
It means the JSON file was exported from a different part of Divi than the one you are importing it into. Every Divi export file starts with a context value, and Divi refuses the import when that value doesn’t match the place you’re importing into.
This statement may be quite confusing, because ‘context’ is a word with quite a broad meaning. Here, it means:
Context: the situation or environment in which a file was exported/imported.
This context can be the Divi Builder (a single page layout), the Divi Library, the Theme Builder, or one of the settings screens (Theme Options, the Theme Customizer, the Role Editor). So what this error message means is that the file cannot be imported into the environment you’re trying to import it into. For example, if you’re trying to import a JSON file into the Divi Builder and you see this error, it means that you are importing it into the wrong environment.
Divi 5 shows the same message in two more situations: when the file has no context at all, and when the file isn’t valid JSON (for example a broken download, or a JSON file exported by another plugin). I tested all of these on a Divi 5.18 site, and each one ends with the same “This file should not be imported in this context” message.
Why does the context matter?
Because each part of Divi saves different data: a page layout, a list of Library items, Theme Builder templates or theme settings. Divi’s import (it’s called Portability) only knows how to read the kind of file its own export created, so it checks the context first.
So the rule is: import a file in the same context in which it was exported. If a file was exported from the Divi Builder, import it into the Divi Builder. If it was exported from the Theme Builder, import it into the Theme Builder.
There is one friendly exception in current versions of Divi 4 and in Divi 5: the Divi Library import also accepts a page layout exported from the Divi Builder, and turns it into a Library layout automatically. It doesn’t work the other way around: a file exported from the Divi Library can’t be imported directly into a page.
How to fix the “This file should not be imported in this context” Divi error
Import the file in the same place it was exported from. Check the context (see the next section if you don’t know it), then use the matching import below.
So far so good, right?
But what if you downloaded a layout (for example, this cute About Us page layout for a business couple!) and don’t know how it was exported? Should you just keep trying to import it in different contexts until you find the one that works?
Of course not! That would be quite frustrating, right? Thankfully, there is a shortcut. For one, if you’re using a layout from Divi Lover, it will always come with a brief Read Me file that will tell you in which context the layout should be imported. Most Divi web designers who share free layouts will include this information.
Also, layouts are often downloaded as a .zip file. Unzip it first and import the .json file that’s inside, not the zip.
Page layouts (context et_builder): import in the Visual Builder
- Open the page in the Visual Builder.
- In Divi 5: click the gear icon in the top-left corner and choose Import (or click the Export & Import icon in the top bar). In Divi 4: click the three purple dots at the bottom of the screen, then the Portability icon (two arrows), and open the Import tab.
- Choose the .json file, pick your options (for example Replace Existing Content or Import Presets) and click the import button.
Divi 5 also imports page layouts exported from Divi 4 and converts them to the Divi 5 format, so an older et_builder file works fine.
Divi Library files (context et_builder_layouts): import in the Divi Library
- In your WordPress dashboard go to Divi → Divi Library.
- Click the Import & Export button at the top of the page and open the Import tab.
- Choose the .json file and import it. Your layouts now appear in the Library list.
- To use one on a page: in Divi 5 open Insert Layout → Your Saved Layouts; in Divi 4 use Load From Library → Your Saved Layouts.
In Divi 5 you can also import into the Library without leaving the Visual Builder: in the Your Saved Layouts tab, click the Import icon at the top.
Theme Builder files (context et_theme_builder): import in the Theme Builder
- Go to Divi → Theme Builder.
- Click the Portability icon (two arrows) in the top right corner and open the Import tab.
- Choose the .json file, decide whether it should override your default website template, and import it.
Theme settings (contexts epanel and et_divi_mods)
A file with epanel is a settings file from Divi → Theme Options: import it there with the Portability icon (two arrows) in the top right corner. A file with et_divi_mods comes from the Theme Customizer: import it in Appearance → Customize, using the Portability icon at the top of the Customizer panel. These steps are the same in Divi 4 and Divi 5.
Divi 5 also lets you export and import Variables, Presets, Components and Icon collections. Each has its own Import & Export button in its manager (for example the Variable Manager or the Icon Manager), so import those files back in the same manager.
How to never see this error again: check the context in the JSON file
Open the JSON file in any text editor and look at the very beginning of the file: Divi always writes the context first, for example {"context":"et_builder",. That word tells you exactly where the file should be imported.
All you need is a plain text editor (Notepad, TextEdit, or your code editor). Divi export files are often saved as one very long line, so don’t worry if the whole file looks like a single block of text: the context is always right at the start.

For example, “et_builder” means that the correct context for this file is the Divi Builder. The other versions you may see are: “et_builder_layouts” which means the context is the Divi Library, and “et_theme_builder” which means the context is the Theme Builder. You might also encounter this: “epanel”, which means what you’re dealing with is a settings file exported from the Divi Theme Options. Another possibility is that you’ll see “et_divi_mods”, a file exported from the Divi Theme Customizer, or “et_pb_roles”, a file exported from the Divi Role Editor.
So, to recap: if you have a JSON file you’d like to import, and you don’t know in which context it was exported, you can simply open it in a text editor and check the context. All that remains is to import the file in that context.
The quick fix
Import the file where it was exported: check the context at the start of the JSON file and use the matching import.
- A file can only be imported in the same environment (context) in which it was exported. (The one exception: the Divi Library also accepts page layouts exported from the Divi Builder.)
- To check the context, open the JSON file in a text editor and look at the very beginning. It will tell you the appropriate context in which you can import the file.
Context options:
- “et_builder”: page layout exported from the Divi Builder. Import it in the Visual Builder (Divi 5: gear icon → Import; Divi 4: purple dots → Portability icon → Import).
- “et_builder_layouts”: Divi layouts exported from the Divi Library. Import them in Divi → Divi Library → Import & Export.
- “et_theme_builder”: templates exported from the Theme Builder. Import them in Divi → Theme Builder → Portability icon.
- “epanel”: settings file exported from the Divi Theme Options. Import it in Divi → Theme Options → Portability icon.
- “et_divi_mods”: settings file exported from the Divi Theme Customizer. Import it in Appearance → Customize → Portability icon.
And that’s it! I hope you find this solution to this pesky little problem useful, and hopefully, you’ll never again see the “This file should not be imported in this context” error in Divi. Do you have any other Divi frustrations similar to this one? Share them in my Divi Lovers Facebook group!





