How to Migrate a Legacy .cursorrules File to the New Rules Folder
Convert a single root .cursorrules file into scoped .mdc rules so you get globs, multiple files and per-rule control.
Older Cursor projects keep all their instructions in a single .cursorrules file at the repo root. That still works, but it is deprecated in favor of the .cursor/rules folder, which lets you split rules into files, scope them with globs, and control when each one loads. This guide migrates an existing .cursorrules file cleanly.
What you need
- A project that already has a .cursorrules file at its root
- Cursor open on that project
- Five minutes to split the content into focused files
Step 1: Read your current .cursorrules
Open the existing file and group its content by topic. Most legacy files mix several concerns: language conventions, framework rules, testing expectations and tone. Each of those groups becomes its own .mdc file.
Step 2: Create the folder and split by concern
Make the new folder and create one file per group. Splitting lets you give each rule its own globs so it only loads where relevant, instead of every line being in context all the time.
Step 3: Add frontmatter and move the text
Paste each group into its file under a frontmatter header. Use globs so, for example, the testing rule only attaches when a test file is in context.
---
description: Testing conventions
globs: ["**/*.test.ts", "**/__tests__/**"]
alwaysApply: false
---
- Put tests in `__tests__` next to the code under test.
- Use Vitest, not Jest.
- One `describe` block per exported function.Step 4: Delete the old file and confirm
Once the content lives in the new files, remove the root .cursorrules so the two sources cannot drift apart. Open a chat and confirm the model still references your conventions.
Result: the same guidance now lives in focused, glob-scoped files that load only when relevant, which keeps the context window cleaner and your rules easier to maintain.
Watch related tutorials
1:42:18
28:14
41:09
9:47
8:23
52:31