Pivot importer for WordPress

De Nederlandse versie vind je hier!

Update: There’s a new version available, that was changed to work with WordPress 2.0. And since it’s a zip file rather than the HTML-ized source, it should be easier to download as well. I’ll adapt the documentation at a later time, but in the mean time here’s the quick howto:

  • Dump this file in /wordpress/wp-admin/import/
  • Have your pivot directory (with at least pv_cfg_settings.php and the ‘db‘ directory structure inside) ready and waiting inside your wordpress directory
  • In WordPress, go to Import, choose Pivot, and follow instructions.

Easy peasy, right? Make sure you backup before you go, and let me know if it worked for you!

From here on, it’s the old documentation.

I wrote this one a while ago, but never bothered to publish it: an import script to import Pivot postings (and users, and categories) into an existing WordPress installation. Using it is pretty simple:

  1. Make sure your WordPress install works, and that you have a working backup just in case.
  2. Download the script here (right-click, save as…), rename it to import-pivot.php (without the trailing ‘s’), and upload it into your wp-admin directory inside your WordPress directory
  3. Make sure the pivot directory (containing at least the db directory and the file pv_cfg_settings.php) are one level above your WordPress directory. If you installed WordPress in your site root (you know that that’s a bad idea, right?) you should open the script in a text editor and edit $pivotdir to match your situation. If the pivot directory is inside your wordpress directory, take one ../ out of $pivotdir.
  4. Login as admin in WordPress, and run the script. Assuming a straight-up WordPress install, that should be something like yourdomain.com/wordpress/wp-admin/import-pivot.php.
  5. Follow the instructions.

If stuff blows up, please let me know what went wrong (giving more details than “it didn’t work, you are TEH SUCK!”). Make sure you include any error message it threw at you.

Addendum: Of course there’s still the matter of images. Maybe I’ll have them translated automagically in the future, but for now you could do with the Pivot Image Tag Translator plugin. That’s a Dutch page, but all you have to do is download and install the plugin. Oh, and maybe edit it a bit, if the image path isn’t correct for your setup.

Have fun!

Jens zegt:

Hi!

I used your script and it worked like a charm. The only thing is: my blog was in German language with special characters. Those weren’t correctly transferred and need to be edited manually. But everything else is great.

Thanks for the great work!

Max zegt:

Hm, yes, encoding might be an issue — I think Pivot defaults to Latin-1, while WordPress defaults to UTF-8. I’ll work on it, somewhere soon… =]

Thanks for this script, now I can SEO my journals. Got some dust on the screen though:

Import

If you have posts or comments in another system WordPress can import them into your current blog. To get started, choose a system to import from below:

Warning: session_start(): Cannot send session cookie – headers already sent by (output started at /www/web1171/html/journal/wp-admin/admin-header.php:16) in /www/web1171/html/journal/wp-admin/import/pivot.php on line 363

Warning: session_start(): Cannot send session cache limiter – headers already sent (output started at /www/web1171/html/journal/wp-admin/admin-header.php:16) in /www/web1171/html/journal/wp-admin/import/pivot.php on line 363

It doesn’t mean much to me, but you might find it interesting. I’m using wordpress 2.0.2

Sorry voor bovenstaande rotzooi, misschien had ik geen – oeps nu doe ik het bijna weer- streepjes moeten gebruiken?

vineet zegt:

hi thanks for the script! it works fantastic, only thing is all the pivot image tags “[[image:....]]” are preserved, is there anyway to incorporate a regex thing within the script that will convert all those tags to html image tags during the import?

best.

Max zegt:

Robert: Die foutmelding wordt ergens anders gegenereerd — in admin-header.php, om precies te zijn. Zou niet moeten, gaan we naar kijken. Verder heb ik de streepjes even opgeruimd =]

vineet: there is a plugin for that. The instructions are in Dutch, but boil down to “download, install, …, profit!”.

Bob zegt:

Thanks so much for this importer! I just migrated to WordPress and feared I would lose almost 2 years of blog posts. Your script worked perfectly! A few extra minutes to clean up comments and re-add images has saved my blog!

Goya zegt:

Hey,

Je scriptje (laatste versie) blijft spijtig genoeg tussen stap 2 en 3 steken. De URL verspringt na een tijdje naar …step=3 maar zelfs na een uur wachten gebeurt er niets meer… En ongeveer een 4de van de posts zijn geïmporteerd.

groeten, Goya

Goya zegt:

Ik heb er een beetje beter zicht op wat er gebeurt: Blijkbaar worden grote hoeveelheden (3243 nu) lege postings in de “Uncategorized” categorie gedumpt zodat telkens maar een kleine hoeveelheid “echte” postings geïmporteerd worden…

digital zegt:

hi. the importscript idea is great! but unfortunally it looks like it doesnt work with wp 2.0.x and pivot 1.40 ? is there any possibility to import taggerati with your script or a further version?

josh zegt:

i don’t speak dutch so ya

mrafv zegt:

Brilliant! This worked perfectly (except for the images as described), thank you very much.

David zegt:

I just moved Portent.org over to WordPress from Pivot (high cpu problems forced the move) using your script which worked very well. Also the image tag translation worked nicely as well. The only mod I had to do was add the path to the image folder into and change $DNZM_PITT_REPLACEMENT = ”;

into

$DNZM_PITT_REPLACEMENT = ”;

Because that’s where they are. Both worked first time and 864 entries imported very quickly. Brilliant!

Thank you!

David

David zegt:

Ah- putting scripts in comments gt zapped. I changed the line that started $DNZM_PITT_REPLACEMENT =

where it said img src=”$1″ to img src=”/images/$1″

David

piter beekman zegt:

Hoe moet ik pivot installeren weten jullie het mischien?

Max zegt:

Datgene wat ik weet heb ik uit de installatiehandleiding, die je, verbazend genoeg, ergens op de site van Pivot zult vinden. Deze post heeft NIETS met het installeren van Pivot te maken.

netjeff zegt:

This worked great for me! I went from Pivot v1.24.1 to WordPress v2.3.2.

BTW, be sure to follow the instructions in the extracted pivot.php rather than the ones above. I wasted a bit of time trying to run pivot.php directly (via the URL) as described above, rather than using the wp admin “Manage” then “Import” screen to kick off the pivot import, as described in the pivot.php itself.

Kim zegt:

Nice it worked :)

Thank you!

Marcel zegt:

Looks promising. Can this script also import from PivotX 2.0 to WordPress 2.9?

Max zegt:

At this point, no, I don’t think so. In fact it’s been broken for quite a while (although I see the occasional success story). I just never seem to get around fixing it…

Tim zegt:

bedankt voor je script, werkte prima!

Laat maar horen