Manage sites from a terminal#
At the end of this path, you will have your sites registered as profiles, you will publish content in bulk after previewing it, and you will have recipes for everyday jobs.
Try it now#
This command searches demo.plone.org, a public site that resets every night, without logging in.
uvx --from "plone-client[cli]" plone-client --url https://demo.plone.org search -q Plone --limit 3 -f title,@type
You need#
uv.
Docker, from the second step on.
No Plone knowledge: Get started has what you need.
Follow these steps#
Install plone-client gives you a permanent
plone-clientcommand, becauseuvxdownloads it each time.Your first command line session is the core of the path: you add a read-only profile, a local one, and publish in bulk.
Manage profiles adds your own sites, and keeps their secrets where you want them.
Preview changes and protect a site shows the difference between a dry run and a read-only profile.
Everyday site management has a recipe for the common jobs.
Use the command line in scripts and CI takes the same commands to scripts and scheduled jobs.
Going further#
Cheat sheet lists the commands by task, on one page.
Command line has every option of every command.
Services shows the command for each service.
If something breaks#
Troubleshoot goes from the symptom to the fix.
Before you connect a real site#
Log in as a dedicated Plone user with only the permissions you need, not
admin.Add the site first as a read-only profile, with
--read-only.Add
-nto the first command that writes, and read what it would send; see Preview changes and protect a site.Keep the password in the keyring, or use
--secret envor--secret commandwhere there is none; see Use the command line in scripts and CI.In scripts, check the exit code of each command, and pass
--yesonly to commands you have run by hand first.