Here is everything you need to know when using the Import/Export feature to make a bulk change to your content in your repository. 

Note: the Import/Export feature is only available starting from the Medium plan.


General Issues

The first thing we need to cover are some of the general limitations of doing bulk changes with Import/Export.

  • Releases aren't included in this Import/Export process.
  • Draft documents/versions aren't included in the process.
  • Archived documents also aren't included. 
  • You will lose Image positioning and zoom in this process. So be very careful with this process. You will need to re-apply any image cropping and zoom after running the import. 

With that in mind, let's take a look at how you can make bulk changes.


Run the Export

First you will need to run the export of your repository. 

  1. Go to your repository's Settings > Import/Export. Note that if you don't have access to the repository settings, then you will need to have one of your repository Admins help you with this or give you Admin access so that you can.
  2. Under the "Export your documents" section, click to "Export your documents". If you don't see this button, then you might need to click on the "Done" button to reset the Export and run it again.
  3. Download the export.


Make your bulk change

Next you'll need to do a find-and-replace to make the bulk change(s) that you need. For example, you could open the files in a code editor such as Visual Studio Code. Most code editors like this will have find-and-replace functionality to make this easy to do.

You just need to make sure that you don't change any of the file names for any of the documents. This will ensure that the re-import will work.

Import your updated documents

After making your changes, you can re-import the documents that you updated. 

  1. Collect all the documents that you made changes to. You will only need to re-import these, there is no need to re-import documents that you didn't update.
  2. If you ended up with more than 200 files, then you will need to break this up. There is a limit of 200 documents per import, so you will need to separate the import into batches of up 200 documents.
  3. For each batch of documents to import, select the batch of files and compress them directly. Don't compress the folder they are in, the import won't work if you do this. You need to directly select all the files, and compress them that way.
  4. Go back to the Settings > Import/Export in your Prismic repository.
  5. Import your content. 
  6. Once you've completed the import, the documents will appear in a release. Make sure to check that the correct changes have been made and everything looks good.
  7. Don't forget to re-apply any image cropping or zoom that you had previously as this is lost in the Import/Export process.
  8. If all is well, then you just need to do is publish this release and your new updated content will be live!
Did this answer your question?