Upgrading Omeka from 1.5.3 to 2.1.4 via Unix


I was recently given the task of upgrading a client's Omeka version so we can move the site to another location. Long story short, I have an Omeka installation on a Unix server with a MySQL database. It is running version 1.5.3. I have downloaded the zip file for the new version of Omeka and I have created a backup of the MySQL database. I believe I am ready to try to upgrade the existing Omeka installation, however, I do not do web work that often (I am more of a hardware guy) and I was hoping for some help on how to go about upgrading to the newest Omeka.

Any help would be greatly appreciated.

There this guide to upgrading, which should cover most things. In a nutshell:

1) Deactivate all the plugins
2) Replace the old files with new ones (some, like db.ini, will remain in place -- more in the longer guide)
3) Go to the upgrade page in Omeka

There are more details to watch in the page I linked to, but overall that's all that needs to happen.

Good luck

I have indeed seen that guide, however I guess I was specifically looking for help on how to do this in unix since the data is based on a Unix server. I have limited Unix experience.

Meaning that you have to do it all from the command line? If so, it would be easier to do this from an FTP client if you can get the credentials. Other than that, there's nothing UNIX specific. Most people run Omeka on Linux.

Alrighty, so I grabbed an FTP client (FileZilla) and connected to the site. Now on this guide: https://omeka.org/codex/Upgrading
Number 3 says to move my omeka installation. Does this mean I can just grab the files located in the "omeka" folder and move them either to my desktop or another folder on the server?

Yep. Move them anywhere you want.

Alrighty, I have moved the old files to another location. I have followed the steps in the guide, but when I go back to the site, it gives me a 404 not found error. What did I do? DO I need to somehow publish the site?

I am in a pickle here. I really need some help.

The obvious mistake would be that you didn't put the new Omeka files in the right place, so your URL isn't the same anymore.

ok, so first things first, I moved the old omeka installation to a different foler on the server. I then put the omeka files that I extracted from the omeka 2.1.4 zip that I downloaded, into the "omeka" folder on my server. I then replaced the db.ini file from the new installation, with the db.ini folder from the old installation. I then moved the "archive" folder from the old installation to the new installation. (I was moving from a omeka 1.x version to the 2.x version). I then got rid of the "files" folder that was on the new installation. I renamed the "archive" folder to "files" and renamed the folder "files" that was within the recently renamed folder "files" to "original". I then moved my plugin files from the old installation to the new installation.

At what point did I mess up here. I am assuming it has something to do with the "files" folder. The instructions said to copy the "archive" folder from the old installation and rename it "files." Thinking I was clever, I moved the already existing "files" folder to somewhere else on the server since I didnt want it there when I moved the "archive" folder in and renamed it to "files."

It's also easy to miss the 'hidden' file, .htaccess. Is there a .htaccess file in the omeka folder?

There is, should I grab the .htaccess file from the old installation folder and replace the one that currently resides in the new installation?

No, you should use the new .htaccess file that came with the new installation.

Hmm, well I am still getting that 404 error. Perhaps I am missing something with the very vague instruction on number 5, bullet point 4 on the upgrade guide: "If you've modified any of Omeka's core files, you'll need to move those changes over too (be careful with this, as the original file may have been changed in newer versions)." How do I know if I have modified omeka core files or not?

Chances are very good that you haven't, and if you have there is a good chance that they would break things. So I'd assume that you haven't.

Are all the files readable by the web server?

I guess I am not quite sure what you mean by readable. When I try to go to the URL, it gives me a 404 not found error.

Are you sure you really put the new Omeka files in the same place you had the old ones? It would be really easy to accidentally put them in a folder inside the original location, so something like omeka/omeka or omeka/omeka-2.1.4.

That would make this just a simple case of the URL you're going to not pointing at the place where the files actually are.

I put the omeka files in the right place. I did everything the guide told me to do. When I unzipped the omeka-2.1.4 zip, it had these folders in it: admin, application, files, install, plugins, themes, .htaccess, bootstrap.php, license.txt, readme.md, and robots.txt.

I placed all those files and folders into the omeka directory on my server where the old omeka files were located. I moved the old installation to a folder named "old" on the same server.

I then moved the "files" folder that was in the new installation to the "old" folder and replaced it with the "archive" folder from the old installation. I then renamed the folder, and the sub folder the appropriate names as it states in the guide. I also moved the db.ini file from the old installation (replacing the db.ini file that came with the new installation). I then moved my plugins from the "plugins" folder in the old installation to the new installation.

You didn't mention "index.php" among the files that you put in the omeka folder. Missing that file would definitely cause a 404.

Did that one get missed, or did you just omit it from your list accidentally?

I have not actually touched the index.php file. SHould I replace the index.php file in the "new" installation with the one from the "old" installation?

You don't need to replace it—you want the one from the zip.

I was just noting that you listed the files and folders you unzipped and put in the omeka directory. Your list didn't include index.php, so I wanted to make sure that you had that file there.

Ok lets try this. I am going to list off all the files in my "Omeka" folder, and I will tag them with either "old" as in they come from the old installation, or "new"

admin "new"
application "new"
files "old" (renamed from "archive")
install "new"
plugins "new"
themes "new"
.htaccess "new"
bootstrap.php "new"
db.ini "old"
index.php "new"
license.txt "new"
README.md "new"
robots.txt "new"

Please don't post "bump" messages. Even without them your thread still would have been one of the top threads on the front page of the forums.

Those look like all the files you should have. Had you made any changes to your "old" .htaccess, like setting a RewriteBase? If so, you'd need to apply those same changes to the "new" copy.

I apologize for the bump messages, kinda in a bit of a panic about this site. I have not touched the "old" .htcaccess file, though in the "old" directory, there is a.htaccess.old file

I can't think of anything else obvious here.

Can you post the URL you're using, and the full local path to the Omeka folder that you listed out above? Also, is there any information at all on the 404 page you're getting?

full path: sftp://momara@ovid.u.washington.edu/nfs/bronfs/uwfs/hw00/d47/momara/omeka

url: http://faculty.washington.edu/momara/omeka/

Going to http://faculty.washington.edu/momara/omeka/index.php shows the normal Omeka "pending upgrade" page.

It looks like you might need to check with the university's IT about whether mod_rewrite is available, or if you have to do something special to get it working.

That ".htaccess.old" you mentioned from the old Omeka folder could be a sign that you or a server admin made some needed changes to that file (the ".htaccess" without the .old extension in the "old directory). You might want to take a look at the differences between the regular and ".old" versions of that file.

Alright, so I found this in the old .htaccess file:

# If you know mod_rewrite is enabled, but you are still getting mod_rewrite
# errors, uncomment the line below and replace "/" with your base directory.

RewriteBase /momara/omeka

It was:
# If you know mod_rewrite is enabled, but you are still getting mod_rewrite
# errors, uncomment the line below and replace "/" with your base directory.
# RewriteBase /

in the old .old file. I changed it in the new .htaccess file and it prompted me to upgrade the database.

I upgraded the database and it is working!!!!

Thank you so very very very very very much for your patience and your help in getting this resolved.

Alrighty, so bringing this thread back from the dead, I had to take some time off so I wasn't able to fully make sure the site was working perfectly before I left. Today, I tried to reactivate the plugins that I disabled before the update. Unfortunately, it seems to have broken the site. going to the admin page gives me alternatively a HTTP Internal Server Error 500 or just a blank page. Is there any way to disable or enable plugins without having access to the admin page?

A quick-n-dirty option is just to move the plugin's folder out of plugins/ or to a different name, which effectively disables it.


Also, when upgrading plugins, do I replace the old plugin folder with the new ones? Or do I copy the contents of the new folder into the old directory?

Generally you want to replace the entire plugin folder, not copy on top of the old one.

The only exception might be if you've hacked on a plugin and made changes of your own, or stored files within for something like the Dropbox.