This is a simple skeleton for WordPress, that makes it possible to have just "themes" and "plugins" under version control:


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).

  • 1
    The theme_root (_uri) is necessary to make the stylesheet work. Have you tried that too? – fuxia Nov 20 '13 at 21:17
  • Didn't touch this. I just added the folder structure above. The alias for the theme seems to be irrelevant because the output is just empty. What do you think it should be? – LeMike Nov 20 '13 at 21:32
  • It should be a publicly accessible URL. The empty page is probably the result of a suppressed error. See debug. – fuxia Nov 20 '13 at 21:38

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.