Migration and Upgrade of Pressbooksto Docker

Hi everyone,

I need to upgrade and migrate my two instances of Pressbooks (test and prod) to a new server, with each instance running in its own Docker container (currently they are not containerized).

My initial plan was to “simply” copy the existing directories and DB from the old server to the docker containers and then do the upgrade.
But maybe it is better to install fresh up-to-date instance on the docker and export the content and DB using the export feature from the Dashboard.

Do you have any recommendations on the best approach ?
Are there any key point I should be aware of when configuring Pressbooks in a docker environment ?

For your informations here are the details of my current installations :

My prod :

· WordPress Configuration
Network Type: Subdirectory
Version: 6.6.4
Memory Limit: 64M

· Pressbooks Configuration
Version: 6.19.2
Root Theme: Aldine
Root Theme Version: 1.19.1

· Server Configuration
PHP Version: 8.1.25
MySQL Version: 10.5.29
Webserver Info: Apache/2.4.65 (Debian)

· Root active Plugins
H5P: 1.15.8
Hypothesis: 0.7.3
Import Markdown: 1.11
Koko Analytics: 1.3.12
Pressbooks: 6.19.2
WPForms Lite: 1.9.0.4

My test :

· WordPress Configuration
Network Type: Subdirectory
Version: 6.8.3
Memory Limit: 64M

· Pressbooks Configuration
Version: 6.25.1
Root Theme: Aldine
Root Theme Version: 1.23.3

· Server Configuration
Same as prod

· Root active plugins
H5P: 1.16.0
Hypothesis: 0.7.4
Import Markdown: 1.14
Koko Analytics: 2.0.18
Pressbooks: 6.25.1
Prime Mover: 2.1.0
WPForms Lite: 1.9.8.1

Thanks in advance for your insights!

Charlotte

Hi Charlotte,

I would not recommend using the Dashboard export/import feature for this migration, as it’s intended for moving book content rather than a full Pressbooks instance. To preserve users, settings, media, and network configuration, it’s better to migrate the database, uploads, and any custom themes/plugins directly.

Containerization doesn’t change the migration approach — it mainly affects deployment (e.g., using persistent volumes for uploads and a separate database). You can also use Roots Bedrock with this setup, but keep in mind it introduces some path/config differences.

I’d suggest not combining migration, containerization, and upgrades all at once. A safer approach is:

  1. Set up the Docker environment first (matching current PHP and Pressbooks versions)

  2. Migrate DB and files, and confirm everything works

  3. Then perform the PHP and Pressbooks upgrades

This helps isolate issues and makes troubleshooting much easier.

3 Likes