Getting started with Plone
While very similar to Zope, there are some subtle differences.
This isn't meant to be some grand tutorial or go super in-depth, it is only some basic personal notes I thought I'd share on my website, nothing special, and mostly from the official Plone documentation. In fact, my notes follow this document almost exactly, and I don't really want to replicate it all here, but perhaps I will for completions sake, as I do have a lot of the Zope installation copied as well.
First ensure that Python and the virtual environment system packages are installed, for Debian:
apt-get install python3-dev python3.13-venv git
The tool make might be required for development of add-ons, so install that as well if you will be developing Plone add-ons.
mkdir plonecd plonepython3 -m venv venvvenv/bin/pip install -c https://dist.plone.org/release/6-latest/constraints.txt Plone pipx
Create a basic instance.yaml file as such:
default_context: initial_user_name: "admin"# Use a secure token for the password in a production environment. initial_user_password: "admin" wsgi_listen: "localhost:8080" debug_mode: false verbose_security: false db_storage: "direct" environment: { "zope_i18n_compile_mo_files": true, }
Once the configuration has been created, the Zope Instance can be created as such:
venv/bin/pipx run cookiecutter -f --no-input --config-file instance.yaml gh:plone/cookiecutter-zope-instance
Once it has been created, it can run in the foreground during development with:
venv/bin/runwsgi -v instance/etc/zope.ini
I cannot recall if cookiecutter required that make be installed or not. If you plan on developing an add-on, there is an additional Python package which will make it easier to get started:
venv/bin/pip install plonecli
Due to the way that plonecli works, you will need to enter the virtual environment for it to work correctly:
source venv/bin/activate
This will put (venv) before your shell prompt to show you that this shell is within a virtual environment. Here are the commands needed to say create a new content-type, and a view for it in the current directory:
plonecli create addon myaddons.todocd myaddons.todoplonecli add content_typeplonecli add view
You can see all the components that you can add via:
plonecli -l
This will list add-on at the root, and below it all of the various components that can be created within an add-on project. To make this new add-on available to be installed within your local Plone site, you can add it in and keep it editable via:
pip install -e myaddons.todo
You can start the WSGI server with additional options for development and debugging with:
runwsgi -v -d -e instance/etc/zope.ini
And that's all I got in my notes for now. Happy Ploning!
