Keeping themes and plugins outside the Omeka root directory


I had to reorganize my installation of Omeka because I wanted to keep the core omeka directory separate from /files, /plugins and /themes (for the sake of using svn externals for easy updates)

So, my root directory consists of


/core is the BASE_DIR -- that's where bootstrap.php resides.
/extensions has two subfolders:


I have changed bootstrap.php to reflect this:

define('BASE_DIR', dirname(__FILE__));
define('APP_DIR', BASE_DIR . '/application');
define('PLUGIN_DIR', BASE_DIR . '/../extensions/plugins');
define('ADMIN_DIR', BASE_DIR . '/admin');
define('FILES_DIR', BASE_DIR . '/../files');
define('ADMIN_THEME_DIR', BASE_DIR . '/admin/themes');
define('PUBLIC_THEME_DIR', BASE_DIR . '/../extensions/themes');
define('INSTALL_DIR', BASE_DIR . '/install');
define('MODEL_DIR', APP_DIR . '/models');
define('FORM_DIR', APP_DIR . '/forms');
define('CONTROLLER_DIR', APP_DIR . '/controllers');
define('LIB_DIR', APP_DIR . '/libraries');
define('CONFIG_DIR', APP_DIR . '/config');
define('LOGS_DIR', APP_DIR . '/logs');
define('VIEW_SCRIPTS_DIR', APP_DIR . '/views/scripts');
define('VIEW_HELPERS_DIR', APP_DIR . '/views/helpers');
define('UPGRADE_DIR', APP_DIR . '/migrations');
define('LANGUAGES_DIR', APP_DIR . '/languages');
define('SCHEMA_DIR', APP_DIR . '/schema');
define('SCRIPTS_DIR', APP_DIR . '/scripts');

Now both the admin side of things and the plugins work as expected, but the frontend displays pure text without any styling. In other words, both the theme directory and the files are getting 404.

Any idea on how to troubleshoot this?

All best,

just a little update — i tried to make a new, clean installation of omeka with the following set up just to test and i got the same results.

this can't be right. has anybody successfully managed to change the default directory structure using bootstrap.php? any tips would be greatly appreciated.

all best,

I'm still looking for a solution here — I would really appreciate it if somebody form the Omeka team would help me out.

It doesn't look like you have also changed WEB_ROOT and other WEB_* constants later on in bootstrap.php. Maybe making the changes there will do the trick.

I tried different things there but it didn't seem to help. That, however, may have to do with the fact that I don't understand what "WEB_DIR depends on the bootstrap used (public/admin)" really means...

If you can guess what the values should be there based on my actual paths set above, please let me know...

// WEB_ROOT is always the root of the site, whereas WEB_DIR depends on the bootstrap used (public/admin)
define('WEB_ROOT', $base_root . (!empty($dir) ? '/' . $dir : '') );
define('WEB_DIR', $base_url);
define('WEB_THEME', WEB_DIR . '/themes');
define('WEB_PLUGIN', WEB_ROOT . '/plugins');
define('WEB_FILES', WEB_ROOT . '/files');
define('WEB_PUBLIC_THEME', WEB_ROOT . '/themes');
define('WEB_VIEW_SCRIPTS', WEB_ROOT . '/application/views/scripts');

i am still looking in vain for an answer to my question about how to keep themes and plugins and files outside of the core Omeka directory.

I wonder though if the following might be helpful in troubleshooting the issue: if I point to a specific file from the theme which is not in root folder and with the above setup (for instance:, I get the following:


Action "noviPrepis" does not exist and was not trapped in __call()

#0 /Users/ttasovac/Development/ Zend_Controller_Action->__call('noviPrepisActio...', Array)
#1 /Users/ttasovac/Development/ Zend_Controller_Action->dispatch('noviPrepisActio...')
#2 /Users/ttasovac/Development/ Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#3 /Users/ttasovac/Development/ Zend_Controller_Front->dispatch()
#4 /Users/ttasovac/Development/ Zend_Application_Bootstrap_Bootstrap->run()
#5 /Users/ttasovac/Development/ Zend_Application->run()
#6 /Users/ttasovac/Development/ Omeka_Application->run()
#7 {main}

Your input will be greatly appreciated.

All best,

Because of the way Omeka builds routes to pages, trying out direct expected paths won't work --those will always be interpreted via Omeka's routing mechanism, not as direct paths to the file.

I suspect that adjusting the WEB_THEME and WEB_PLUGIN constants to reflect where you have moved the plugins and themes under /extensions will still be the way to go. Maybe echoing out their values will help you see where they are not being put together properly.

Thanks, Patrick.

I don't see how WEB_THEME or WEB_PLUGIN would change anything — they have nothing to do with the actual path but what is shown in the URL. Having said that, I tried changing them as well, but to no avail.

If I echo them, they show what i think they should show: and

Also, as I said earlier, plugins work without any problems in the set up I am describing, even though my plugins are also outside the root. It is only /themes and /files that do not.

Is it not possible that the problem is in the Omeka controller or somewhere else in the system?