The active theme is broken. Reverting to the default theme

Hello, this is my first post here!
I’ve been trying to create a Wordpress Boilerplate with webpack and Docker, only with Root’s Wordpress I’ve managed to have something cool.

For now, I’m doing the DB changes automagically for testing purposes.

I do everything in my http://localhost:8080, I export the DB, then I push.
My test pipeline executes the following commands (In that order)

    • ‘composer install -n --no-dev --ignore-platform-reqs --optimize-autoloader --prefer-dist’
    • ‘chmod 775 .env’
    • ‘chmod 775 composer.json’
    • ‘chmod 775 composer.lock’
    • ‘chmod -R 775 web/app/themes/*’
    • ‘wp-cli db export exports/just-in-case.sql’
    • ‘wp-cli db reset --yes’
    • ‘wp-cli db import exports/sql-dump-development.sql’
    • ‘composer dump-autoload’

(All the permission changes are my attempts to get this working)

The problem is that when I log in, I get this message:

The active theme is broken. Reverting to the default theme.

But the theme files are there, I can even see the theme in the dashboard (The active theme in my local is Boilerplate). I can select the theme manually again, but from the pipeline it does not work

:frowning: Can you spot something I’m missing?


wordpress does some fancy theme handling and stores absolute path to the theme in the database.

so if you have theme in different location on the server - it wont work.

im also trying to figure out deployments atm.

I solved my issue by using wp cli to set theme path on every deploy:

docker exec sunrise-wp wp --allow-root --quiet --path=/var/www/sunrise/current/bedrock/web/wp option set template_root {{release_path}}/bedrock/web/wp/wp-content/themes