Repository navigation
[plugin-import-export] Can I import/export global configs? #17509
Unanswered
jakeisonline
asked this question in
Q&A
Replies: 2 comments
|
Collections only. The plugin config takes a If you just need to move a global between environments, the Local API is the easy way out: const data = await payload.findGlobal({ slug: 'site-settings' })
await fs.writeFile('site-settings.json', JSON.stringify(data, null, 2))and on the way back in: await payload.updateGlobal({
slug: 'site-settings',
data: JSON.parse(await fs.readFile('site-settings.json', 'utf8')),
})Run it from a script that calls |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Or, can the import-export plugin only handle collections, not global configs?
All reactions