Skip to content

Payload

Payload adds a CMS editor and content service to a Next.js project. The developer defines fields and access rules in code while editors use the browser to manage entries.

Visit Payload

What do you need besides the Payload editor?

You need a compatible Next.js project, a database connection and somewhere persistent to store uploaded files. Payload is MIT-licensed software. Budget for the application host, database and file storage separately.

Start by defining one collection, such as help articles with titles and answers. Your developer sets up its fields in code and the admin panel uses those definitions. If the host clears local disk between deployments, use a persistent storage adapter for uploads.

How do you make the draft visible to editors only?

Enable drafts for the collection and decide who can read the draft and who can publish. Apply the collection’s access rules so signed-out readers receive only published content. The authorized preview can request the newer version.

Code on the server can read Payload directly through the Local API. That interface skips access rules by default. For a request made on behalf of a user, have the developer explicitly apply the rules and pass the authenticated user when there is one. Keep the public response limited to published fields and the editor preview behind sign-in.

What should you keep if you move a Payload site?

The optional import and export plugin can move collection records as CSV or JSON. Decide whether to include drafts and check what fields were exported. A deployment restore also needs the application code, the database backup and the original upload files.

Keep private drafts and files out of any export you share. Restore to a separate environment first and check the records, image links and editor permissions before sending visitors there.

How can you plan the visitor and editor views without a deployment?

Sketch an event page and an admin panel with two dates on paper. Keep real credentials, app hosting and database connections out of the exercise.

  1. Draw the published and draft versions
    Give the public page the earlier published date. Draw the new date in an editor’s draft.
  2. Trace who may see each version
    A signed-out reader gets only the published date. An authorized editor gets the preview. Mark where the server has to enforce the rules on direct CMS reads.
  3. Check the move plan
    Put collection records, field definitions, the database and original media in separate boxes. Mark which items a record export covers and which the new deployment needs separately.