Skip to content

docs: add custom admin location docs#15581

Open
zubricks wants to merge 1 commit intomainfrom
docs/custom-admin-location
Open

docs: add custom admin location docs#15581
zubricks wants to merge 1 commit intomainfrom
docs/custom-admin-location

Conversation

@zubricks
Copy link
Member

Fixes #13707

  • created comprehensive custom admin location guide
  • updated admin/overview.mdx with cross-references and FAQ
  • updated custom-components overview with import map regeneration details

- created comprehensive custom admin location guide
- updated admin/overview.mdx with cross-references and FAQ
- updated custom-components overview with import map regeneration details
**2. Rename the folder:**

```bash
# Move the admin folder
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move => Rename

mv app/(payload)/admin app/(payload)/dashboard
```

**3. Restart your dev server**
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One missing step: you will have to change the import in src/app/(payload)/layout.tsx

from

import { importMap } from './admin/importMap.js'

to

import { importMap } from './importMap.js'

if you're unlucky and your IDE does not auto-update imports. Maybe just mention that the user needs to make sure old imports referencing the admin folder need to be updated, so they should run build / typecheck and update imports until it passes.

export default buildConfig({
// ...
routes: {
admin: '/admin/content',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So if you do this:

mv app/(payload) app/admin/content/(payload)

The admin route will be under /admin/content/admin, not /admin/content. Maybe a bit of a strange example, because the API is not part of the payload admin panel, so might not wanna put it under /admin.

Also unlike the first example, this change moves both the payload API and admin panel, so might wanna clarify that in the heading

## Scenario 2: Nested Admin Panel

@zubricks zubricks removed the request for review from JarrodMFlesch February 13, 2026 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Payload needs better documentation around moving the payload folder/root access

2 participants