---
title: "Migrating content collections from Astro 4 to 5"
url: https://daily.dev/posts/migrating-content-collections-from-astro-4-to-5-suoh4quti
source_url: https://chenhuijing.com/blog/migrating-content-collections-from-astro-4-to-5/
type: article
source: "Chen Hui Jing"
published: 2025-11-30T12:32:08.253Z
updated: 2025-11-30T12:34:39.906Z
tags: ["webdev", "astro"]
reading_time: 4
upvotes: 0
comments: 0
language: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Migrating content collections from Astro 4 to 5

**[Chen Hui Jing](https://daily.dev/sources/chenhuijing)** · 4 min read · 0 upvotes · 0 comments

## Summary

A practical guide to upgrading Astro content collections from version 4 to 5, covering key changes like moving the content config file, updating collection definitions with the new loader API, switching from slug to id parameters, and handling the deprecated layout field in Markdown entries. The migration requires renaming dynamic route files, importing the glob loader, and updating the render function syntax.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://chenhuijing.com/blog/migrating-content-collections-from-astro-4-to-5/>

---

Tags: [#webdev](https://daily.dev/tags/webdev), [#astro](https://daily.dev/tags/astro)

[View this post on daily.dev](https://daily.dev/posts/migrating-content-collections-from-astro-4-to-5-suoh4quti)
