I am completely baffled by what I would have thought would be a perfectly simple task: moving an existing Omeka installation to a new server.
On my first attempt, I did what I would have done to move (say) a Drupal site: copy the files, move the database tables, and edit the db.ini file to reflect the parameters on the new server. This actually seemed to work (all of the front-end pages looked fine), but I couldn't access the administrator page (myomekasite.org/admin resulted in a 404).
Then I discovered omeka.org/codex/Moving_to_Another_Server. I followed those instructions as meticulously as I possibly could, but I ended up with a site on which I not only cannot access the admin page (404 again), but now none of the front-end pages work (they behave as if there were no items in the database).
This was done on Linux shared hosting, with Omeka 1.4.1 and 1.5.1.
Any hints as to what I could be doing wrong would be greatly appreciated. At this point, I'm almost considering ditching Omeka and creating my own custom item and exhibit display solution in Drupal...
There's really nothing special to moving an Omeka site. Picking up all the files and moving them to the other server, moving the database over, and updating db.ini should work just fine.
The problems you're getting on the newly-moved site sound like what would happen if you didn't pick up the .htaccess file from your existing installation when you moved it over (or, that you have a
RewriteBase in that file that's not appropriate for your new URL).
Some additional details about my situation:
I am trying to install Omeka on a subdomain (exhibits.mydomain.org). The Omeka files and directories (db.ini, .htaccess, admin, application, archive, etc. etc.) are located in /home/myusername/www/exhibits (absolute path as I see it when I do "pwd" after ssh-ing to the server).
I did an absolutely clean install from the Omeka 1.5.1 tarball after deleting and recreating the subdomain and deleting and recreating the database. The install seemed to go fine. If I click on the administration page link from the "install successful" page, I get a normal login screen, and I can log in as administrator, add items, etc. If I then open a new browser tab and type exhibits.mysite.org/admin into my browser URL bar, I get a 404 error. However, if I go to exhibits.mysite.org, I can see the items I added in the other tab.
Would this behavior be consistent with a RewriteBase problem? What should I set RewriteBase to? I've already tried uncommenting the default
RewriteBase /, but that doesn't seem to help any. Setting
RewriteBase /exhibits/ causes 500 errors. Unfortunately, I'm not conversant in URL rewriting and .htaccess files, and the info I've been able to find online is cryptic, so I'm kind of stuck here.
If the site is at exhibits.mysite.org, a
RewriteBase / should be correct.
Did the post-install link from Omeka point you to the same URL you're trying to use in the other tab (exhibits.mysite.org)?
Okay, I just made a bizarre observation. The "Admin Panel" link from the post-install page is
http://exhibits.mysite.org/admin/ (with a trailing slash). That URL works even if I type it in by hand. However, if I delete the trailing slash, I get the 404 error (which, BTW, shows up in the content area of an Omeka-themed page).
On my old site, I had gotten used to just adding "/admin" after the ".org" (our old site is still live, and I just checked to make sure I wasn't loosing my mind), but now on the new site I have to have "/admin/".
No big deal, but I'm still curious why there's a difference. BTW, all of this is happening with the
RewriteBase line still commented out.
I just transferred the files and database tables from the old to the new server (again), and the behavior is as with the test clean install: the front-end pages are fine,
exhibits.mydomain.org/admin gives a 404, but
exhibits.mydomain.org/admin/ works fine.
As far as I'm concerned, this is now a solved problem (as long as I remember the trailing slash), though I still find it weird that the silly '/' would make that big of a difference...
I'm not totally sure still what's up here, but I'd guess it's a difference in Apache configurations between your two servers.
My first guess would be the
DirectorySlash directive being off (it's normally on) on your new server, so the redirect from "admin" to "admin/" that normally happens isn't happening.
I think you can change that directive with
DirectorySlash On in either your server's httpd.conf or in the Omeka .htaccess file.