Skip to Content
DocsSanityImport Demo Data

Import Demo Data

If you have a demo dataset (e.g., demo-data.tar.gz) provided with the project, you can import it to populate your Sanity project with initial content.

Follow the instructions below to import the demo data:

  1. Install Sanity CLI (Optional if using npx): You can run commands using npx without installing the CLI globally.

  2. Login to Sanity: Run the following command and follow the instructions to log in to your Sanity account.

    npx sanity login
  3. Import the Data: Assuming you have the demo-data.tar.gz file in your project root:

    npx sanity dataset import ./demo-data.tar.gz production

    Note: If your dataset is named differently (not production), replace production with your actual dataset name.

  4. Verify: After the import completes, visit your Studio at http://localhost:3000/studio to see the imported content. If everything was done properly you will see the demo products on your site.