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

**URL:** https://discourse.roots.io/t/the-active-theme-is-broken-reverting-to-the-default-theme/19045
**Category:** bedrock
**Tags:** deploys
**Created:** 2020-09-04T16:03:40Z
**Posts:** 3

## Post 1 by @jorgeanzola — 2020-09-04T16:03:40Z

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](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’

- 
  - ‘wp-cli search-replace [http://localhost:8080](http://localhost:8080) [https://development.website.com](https://development.website.com)’

- 
  - ‘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

 ![Screenshot 2020-09-04 at 17.52.30](https://discourse.roots.io/uploads/default/original/2X/3/3e996ed43cf71a7f3303f51839d5eb7dafff3f48.jpeg)

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

Thanks!

---

## Post 2 by @lde — 2020-10-17T12:45:52Z

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.

---

## Post 3 by @lde — 2020-10-17T14:07:44Z

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
