This is a simple skeleton for WordPress, that makes it possible to have just “themes” and “plugins” under version control:
https://github.com/sourcerer-mike/WordPress-GIT-Skeleton
When doing register_theme_directory(__DIR__ . '/themes');
with a folder that is outside of WP, the theme is shown in the backend and can be activated.
But when viewing the front end the page stays blank.
I guess it’s up to the folder being one level above and unreachable for the client. But the server can access it, so I think I’ve done something wrong.
Is there any solution to have themes outside of WP but still working? (otherwise register_theme_directory
is kind of useless)
Or is there a better solution to have those two outside?
(I also need to take care of not so experienced developer here)
My folder structure is like this:
âââ plugins
âââ public (document root of apache)
â  âââ wp-admin
â  âââ wp-content
â  â  âââ plugins
â  â  âââ themes
â  â  âââ twentyeleven
â  â  âââ twentyten
â  â  âââ twentythirteen
â  â  âââ twentytwelve
â â âââ twentyfourteen
â  âââ wp-includes
âââ themes
â  âââ foo
âââ uploads
As soon as I change to theme “foo” the frontend stays white and empty (no single output).
While I cannot speak to your specific white-screen issue, registered theme directories must be within the Apache document root, at minimum.
Many files in themes, such as CSS, JS, images, etc, are served directly by the webserver, not via calls to WordPress. So having a theme directory that is not directly accessible and serve-able by the webserver process clearly will not work.