Omeka at root, with WordPress in subdirectory?

I have a demo community site done in Omeka 1.51 and running fine on Bluehost. I also have an older static/XHTML site of my personal domain working fine in a subdirectory of the same hosting account (as an add-on). However, I'd now like to be able to install WordPress as that subdirectory and move my personal site into it. However, something about .htaccess at the root (I think) is not letting WP install, and the installer is giving me 404 errors. My WP database is there, etc. I'm also considering installing Omeka 2.0 to that subdirectory as a "sandbox," but I'd prefer to have the blogging aspect of WP for that. I can't afford a second hosting account. Help!

I'm pretty sure that Apache will follow the rules in each directory's .htaccess, or the parent directory if none is there. WordPress doesn't seem to ship with an .htaccess file, so suspect that's causing the trouble. My first stab at it would be to follow these WP instructions on creating an .htaccess files, but I haven't tried this myself

Thanks. I'll try that, but I actually couldn't get Omeka 2 to install in a separate directory, either! Surely, the "double Omeka" thing must come up a lot?

I just added WP's .htaccess, but it still says (in my primary/Omeka 1.51 domain's template):

404 Page Not Found

/wordpress/wp-admin/install.php is not a valid URL.

The URL showing is:

This might be useful:

Note the cases where you'll need to modify the default .htaccess and wp-blog-header.php files.

EDIT: you'll edit the route to wp-blog-header, not the file itself, in index.php ...


Thanks, but all of that seems to assume that I already have WordPress installed and want it to be in a directory but then sort of otherwise take over the account's root (public_html). I haven't been able to get it to install in the first place, yet. I can't move index.php and .htaccess from the WordPress subdirectory to the root, because that will kill my Omeka site. It was challenging enough back last summer to get my static/XHTML site working as an Omeka-root-install subdirectory, directed to from my personal domain, and not crashing my Omeka site.

Also tried some rewrite things from this: but (not surprisingly), given this at the root:

RewriteBase /
RewriteRule . /index.php [L]

it crashed my Omeka site.

The rewrite rules from Omeka are likely to be your first problem. To deal with them, you probably need a Wordpress .htaccess in the "wordpress" subdirectory. In that .htaccess, you should have at least:

RewriteEngine on
RewriteBase /wordpress/

and possibly whatever permalink rewrite rules Wordpress wants. This should stop the Omeka rewrite rules from taking effect in the subdirectory.

The second likely issue is that Omeka 1.x has an .htaccess rule that blocks direct access to most PHP files. A section like this in the Wordpress directory's htaccess should fix that:

<FilesMatch "\.php$">
 Order Allow,Deny
 Allow from all

You shouldn't need to move any of the Wordpress files out of the "wordpress" directory.

Thanks a lot, John. I'm finally at the WP installer!

Still not there! Install went through and it claimed it's there, but if I go to that subdirectory it still gives me a 404 error from the Omeka template. So, I guess that means there's a problem with WP's index.php, right?

First thing I'd do is make sure that the Wordpress installer didn't muck with the .htaccess you had created in the wordpress directory.

Seeing the Omeka 404 page means Omeka's rewrite rules are taking effect.

The only things in there (so far) are:

define('WP_USE_THEMES', true);

Added to .htaccess:
RewriteRule ^index\.php$ - [L]

Now I can get to the main WP index page, but still not to the admin page. Do I have to adjust the above to account for index.php in the admin folder?

Sorry about all this WP stuff, but the problem is obviously in trying to get a multi-site going in combination with a root Omeka install.

Never mind. I was able to login, after all. I've just never seen their crazy, stark default main page before! Thanks, again. P.S. I really like Omeka, so don't worry!

Just wanted to let everyone know.

This worked really well for me too (latest omeka and latest wordpress).

Thanks a lot dbowman & John Flatness!


Discoverd a bug. For some reason .htaccess file that works after installation is emptied every now and then and Omeka hook get me to 404 page again.

This has happened two times after doing the installation yesterday and seems to occur when working in WP admin panel.

Any idea, is this WP or Omeka problem?

Problems occured especially when creating permalinks for pages/ post in wp admin. .htaccess-file in the subfolder got erased every time.

Seems that problem was fixed by adding one line of code in to .htaccess-flie in root (omeka installation) :

RewriteRule ^(FOLDER NAME HERE)($|/) - [L]

Hi there,

I followed the procedure described above, and I've a lot of "Fatal error : Cannot redeclare foo()" errors, because there is a conflict on functions names.

Is there a namespacing or anther prefixing system for functions in Omeka ?

Thanks !


There's not a namespacing or prefixing of functions in Omeka. That said, foo() certainly doesn't look like one of ours, or WP's for that matter. Seems like it might be part of a test or development collection of functions somewhere?