Switch Environment
Switch between production and development databases in Payload.
Installation
pnpm add @elliott-w/payload-plugin-switch-env About
The Switch Environment Plugin allows users to easily toggle between production and development database connections in Payload CMS. It can also copy data from the production database to the development environment, ensuring that features requiring both code and data changes can be deployed smoothly. This plugin is essential for developers working with frequent updates on a production database, minimizing the risk of data loss during the development process. To use this plugin, it must be positioned last in the plugins array in the configuration file, with a cloud storage plugin directly preceding it. This ensures that the correct hooks are applied to manage uploads effectively. Key configuration options include setting the database adapter for both production and development, enabling the plugin based on the environment, and specifying options for quick switching or copying data. Limitations include its incompatibility with local file storage uploads in production environments and a lack of support for database migrations. Compatible with Payload 3.0.2 and above, this plugin helps maintain synchronized databases during development, enhancing workflow efficiency.
Package info
- Package name
@elliott-w/payload-plugin-switch-env- Latest version
2.0.3- Unpacked size
- 236 kB
- License
- MIT
- Weekly downloads
- 60
- Last publish
- Mar 6, 2026
More from elliott-w
View profileRedirects
Manage redirects directly within the Payload CMS admin panel.
Nested Docs
Adds parent-child document hierarchies with auto-generated breadcrumbs to Payload collections.
Media Preview
Preview images, videos, audio, and documents directly in the Payload CMS admin panel.
Iframe Tabs
Add iframes into separate tabs in the Payload admin panel.
Relationship Enhancer
Enhances relationships in Payload CMS with referential integrity and bi-directional support.
Comment
Adds a customizable Comments collection to Payload CMS for user feedback.
Similar plugins
More in AdminVisual Editor
Adds a visual live editor to Payload CMS for instant content preview.
Label Popover
Adds descriptive popovers to field labels in Payload.
Shadcn UI components
Integrates Shadcn UI components with PayloadCMS for admin panels.
Media Gallery
Replaces the Payload media collection list view with justified, masonry, and grid layouts plus a lightbox.
Auditor
A plugin for Payload CMS that tracks events and enhances security.