> ## Content Index
> Fetch the complete content index at: https://piotrkrzyzek.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# Create Ghost CMS Redirects From Old WordPress URLs
- URL: https://piotrkrzyzek.com/create-ghost-cms-redirects-from-old-wordpress-urls/
- Published: 2022-04-06T22:33:00.000Z
- Updated: 2026-10-14T13:50:23.000Z
- Description: Simple one line REGEX to create WP url directs in Ghost CMS.
- Author: Peter Krzyzek

Ghost redirects can be created in JSON or YAML, I did mine with regex and the latter.

You only need one 301 redirect in your `redirects.yaml` file:

```yaml
301:
    ^\/[0-9]+\/[0-9]+\/[0-9]+\/(.+): https://your-domainhere.com/$1
```

This will match the `/year/month/day/` (or variation there-of) standard and put the ending part directly to the domain.

💡

Note: You `may` have to restart your Ghost instance to get the redirects to work *and* try it in a new/different browser (or in incognito/private mode).