Skip to content
This repository has been archived by the owner on Oct 13, 2019. It is now read-only.

2.0: Upgrading

Jon Saxton edited this page Jun 3, 2015 · 1 revision

A Note For Current 1.x Users

As of this writing there is no direct upgrade path from the 1.x series of MomoKO. We advise that current 1.x users who have installed via git switch to the 1.6-STABLE branch instead of the latest_stable branch. This will ensure your MomoKO software does not automatically update to 2.0 if you run git pull after 15 June. To do this simply log into your server via SSH and cd to the directory you installed MomoKO to. Once there run git checkout 1.6-STABLE to switch you to the 1.6 branch. After that keep checking our github or momokocms.org for news about the 2.1 release or an importer addin for 1.x. Once either is available you may switch back to latest stable by following the first two steps and then running git checkout latest_stable

What if I would like to upgrade to 2.0 now?

We don't advice it because you could lose your current pages and posts, but if your site is small and don't mind a little bit of work, you can manually import pages, posts, and attachments into MomoKO 2.0's database. This is no small feat and you may forget things, so I suggest making a back up of everything first. Once that is done follow the steps below.

1 - Update your software to 2.0

If you used git to acquire MomoKO you've already set up a local repository just log into your server via SSH and change over to the directory you install MomoKO in. Also, assuming you followed the instructions in the README you are already on the latest_stable branch. After 15 Jun 2015 just run git pull and git will update the software.

If you did not acquire MomoKO with git you will be able to acquire new MomoKO zip archives from FTP or momokocms.org

2 - Set up a 2.0 compatible database

The easiest way to ensure your database is compatible with 2.0 is to set up a new one. You can use the same connection settings, but the best way to set this up is to delete your current "database.ini" and follow the instructions under "Configure MomoKO" in the README. Ensure you use a different table prefix. This will allow you to keep your old tables for reference later.

3 - Import settings and users

You can create an export of your old settings table using any MySQL client. The instructions to do so vary by client. Once the export is available, your can then import it into the new settings table. This will keep your settings the same on both installs.

The new user table should also be mostly compatible with the old one. You should be able to follow a similar procedure and import all your current users. If it fails, you may have to add them each in manually via the cli or dashboard tools.

4 - Add your content

There is no easy way to add the old HTML pages, XML News, or files into the database. This will have to be done manually. For files, we suggest downloading everything in your file directory and uploading them into MomoKO 2.0 manually as attachments. Do this first!

For pages, open the current pages in an HTML viewer. If you have a viewer that supports tabs, just select all of them and open them. On most systems this will open each one in a seperate tab and the real work can begin. This is a manual process, so get ready to spend a lot of time on it. For each file, click new page, click the HTML Source icon, go to you HTML viewer, copy the code, return to MomoKO, and paste the code. Change any applicable properties before clicking save. Rinse and repeat until all pages are added.

For news articles you will be following a similar procedure only all news articles are stored in one file in XML format. After clicking new and switching to post, find the <headline> tag for one post and enter it's contents into the Title field, then find the date and enter that as the creation date in properties, finally find the text and enter that into the body field. Hit save, rinse and repeat for each article until all have been added as posts.

If you're okay waiting...

Then wait! If you don't want to do everything manually, then simply wait until later. We plan on creating a 2.x compatible import addin that will do all of this for you. So hang tight!