§ Upgrading from Older Pivots.
This page describes how you can upgrade from older versions of Pivot, like Pivot 0.9 through 0.12.. I have written a tool to convert your entries, but since the template structure has changed considerably, you will morst likely have to make new templates (or adapt your old ones)..
Don't worry though, since it has not become anymore diffucult, just different. If you've managed to get it done in the older versions, setting up templates in 1.0 won't be that hard.
In this document I will describe how to upgrade to Pivot 1.0 in four steps:
- Getting Pivot 1.0 up and running, without breaking your older install. This way you can take all the time you need to convert, without having to shut down your site.
- Getting used to pivot 1.0 and importing your old entries.
- Building the new templates.
- Switching to the new pivot.
TIP: Before you start the upgrade, make a full backup of your old pivot/ folder.. In the unfortunate case that something goes wrong somewhere, you'll be very happy if you have an uptodate backup on your computer.
§ Installing Pivot 1.0
Just follow the instructions described here: Getting the Latest Files, Uploading the Files, and Setting up the Administrator Account. You should get the latest full install, and not the updater. The updater is only for older 1.0 versions..
To make sure your new Pivot will not break your existing install, do the following:
- The zip file has a folder named 'pivot'. Rename this to 'pivot_new', before you start uploading. This way the new Pivot will be at www.example.org/yourweblog/pivot_new/ instead of www.example.org/yourweblog/pivot/. Otherwise you would overwrite files that the older pivot need to function.
- Before generating the front page for the first time, go to test.php, and save the settings. Your frontpage will be generated as test.php now, and you can test it, but your regular visitors will still see the usual site. and change the settings for the default weblog. Change the setting for 'Front page (Index)' to something like
§ Importing old entries
Before you start importing your old entries, i'd suggest getting used to the
new interface.
Use your ftp client to rename the convert.php.txt file
in your new pivot folder to convert.php, otherwise
it will not run. Open that file in your browser, and you'll be asked for some
information before the conversion takes place:
-
- Location:
- This is the location where your old entries can be found. Suppose you uploaded the new pivot to pivot_new/ and your old pivot is in a folder called pivot/, the location you should give is: ../pivot/db/
- Remove old entries after conversion?
- If you're server runs in safe_mode and you can't convert all entries in one go, use this option. This way the converted old entries will be removed. After it stops because of the safe_mode restrictions, you can restart the conversion and it will continue where it stopped.
- Keep original uid/numbers?
- If you choose to keep the original UID's, the original numbering of entries will remain the same. Otherwise the converted entries will be added to the new database and be assigned a new number (this is the prefered option).
TIP: If you have trouble converting the options in one go, and are a little bit scared of using the 'remove old entries' option, you can do the following.
- make a new folder olddb/ in your weblog's root folder. upload all your entire db/ folder from your local backup to that folder, and chmod all files and folders to 777. (you did make a backup, right?)
- use the following settings in the conversion script:
location: ../olddb/
remove old entries: yes
keep uid: yes
After the conversion is finished, you should be able to find all your older entries in your new Pivot, under
.§ Building the new templates.
Like I said, the new template structure is a bit different from the old one, so i'd suggest taking a good look at the new templates to see how they work. Some pointers if you want to get started on using your old templates in the new Pivot:
- Place the templates in the templates/ folder.
- Rename your weblog.html template to frontpage_old_template.html, to keep it synchronized with the new naming convention.
- Edit this template and replace the [[weblog]] or <cms weblog></cms> tag with [[subweblog:old]].
- Edit the weblog under frontpage_old_template.html. On the second page, assign the category default to the subweblog 'old' (since that's were all your old entries are). Set the template to _sub_entry_standard.html. and set the frontpage template to
- Generate the frontpage and see what it looks like.
TIP: I'd suggest building the entrypage_template.html (the old 'blogentry'-template) and the _sub_entry_standard.html (the old 'shortentry'-template) from scratch using the default one, since those two really changed a lot.
Of course, while you're editing and tweaking, just use 'regenerate frontpage(s)' very often, so you get a good idea about what's happening.
§ Switching to the new pivot.
When you're satisfied with how the new weblog looks, just go to index.php, rebuild the entire site and you're done. After this, you might want to remove the old pivot completely to prevent it from accidentally overwriting your new frontpage.
and change the settings for the default weblog. Change the setting for 'Front page (Index)' to