register_theme_directory() in a mu-plugin to register a custom theme directory (located at
project_root/app/views/, with site_root at
project_root/public/ and WordPress in a Git submodule at
WP_CONTENT_DIR is at
I also use Capistrano to deploy my project.
Every time I deploy, the site breaks, and I get this message in my Dashboard:
ERROR: The themes directory is either empty or doesn’t exist. Please check your installation.
When I navigate into the Appearance tab, my theme doesn't appear on the list until I refresh the page. After refreshing, I can see my theme, activate it, and everything works again.
Why might this be happening on every deploy? I am confused as to why WordPress would think the theme doesn't exist, when it definitely does.