WordPress.org

Support

Support » How-To and Troubleshooting » needs testing: pMachine 2.3 to WP 1.2 converter

needs testing: pMachine 2.3 to WP 1.2 converter

  • Some hours of wrestling with pMachine’s slightly weird db schema, and some debugging later, I got this converter done.
    http://intraordinary.com/stuff/import-pmachine23-0.1.phps
    To convert a blog with it, you first need to install WordPress from CVS, then edit the file to put your pMachine database info, then load that file (rename it as .php and put it in your wp-admin directory) in your browser.
    The conversion could take some time (a dozen seconds for a huge blog), depending on your blog’s number of entries/comments.
    What it does:
    – converts a pMachine 2.3 blog’s entries, categories, users, and comments (and trackbacks and pingbacks) to WordPress 1.2-alpha (cvs)
    – users are converted with level 0, so you’ll have to log in as admin to raise their levels
    – ‘closed’ entries are converted as ‘draft’ entries
    – preferences that have a WP equivalent are converted
    What it still lacks:
    – an actual interface, like the one used for other importers
    – a way to translate pMachine users’ levels to their closest WP equivalents (need info)
    – some more testing 🙂
    Note:
    – it was done from a free version of pMachine 2.3, so I’m not sure of how well it should work with the multiweblogs (not free) version, though there is a blog id variable that you can set to choose the blog to convert

Viewing 15 replies - 1 through 15 (of 32 total)
  • yeah 😉

    Tested this on pMachine Pro 2.3. Some notes follow:
    Supports single database only. You will need to use the same database as your existing pmaching install with this import script. Importing users, two fields required addslashes:
    $member->signature, and
    $member->bio
    A query needs either eliminated or added if wordpress install url is different from pmachine installed location. If adding, example:
    update wp_options set option_value=’http://new.wordpress.url’ where option_id=1;
    In posts, url codes will need converted
    ex. http://www.scroogle.org
    <b>…</b>
    Some immediate observations on wordpress, as a new installer:
    I had no categories, and the Category option wasn’t helpful.
    <i>Note: Deleting a category does not delete posts from that category, it will just set them back to the default category <b>Oops, couldn’t query the db for categories.</b></i>
    Users – this option displayed 4,500+ on a single page. It was a good thing I didn’t import a 20,000+ member pmachine installation.
    I edited an existing entry to fix the .. code, and it disappeared after saving. post_status was previously ‘open’ and now it is empty ”. comment_status was ‘closed’ and is now empty.

    – Hmm, you should be able to use another database just fine. The $pmdb and $wpdb connections should be separate. If that doesn’t work then there may be something wrong with the wpdb class.
    – Install URL: I will change that behaviour. At the moment it blindly takes the install URL that pMachine had set, in the future it should store a new install URL based on WP’s location, just like the WP install script does.
    – Addslashes: will be added. Thanks for the heads up.
    – Ah, good call on the categories. I had assumed there would at least be one category in pMachine but it seems you can run a category-less weblog. So from my assumption, I prefered deleting the first category in WP, which was a mistake.
    I have an idea of how to fix that.
    – URL codes don’t need to be converted. They are bbcode, and we are supposed to handle that just fine. However, at the moment the function to handle bbcode has been neutered. I’ll see with the devs how we can solve that.
    – Post and comment status: I don’t know how this could happen, but I’ll look into it.

    i’ll be testing this as well… i have a pMachine blog that’s about 300-400 entries… so it’s rather small. i’ll let you know how it goes.

    YAY!! i did it! now it’s time to tweak. however, when i imported my entries, i got a slew of errors – most, if not all, stemming from the comments. i probably lost my comments… but i’ll let you know.

    none of my comments imported at all. how can i go about fixing that?

    The easy answer: wait for a working importer.
    Which errors did you get exactly? If you still have them in your browser’s cache, or if you could reproduce them, can you paste them here?

    btw, my WP blog is at http://www.unmixythings.com

    just a note, i got my archives to work. i had to change my permalink structure. i’m only concerned about the comments… i don’t want to chuck my WP tables to reimport. (i’d rather not.) if you can write up a script to just import the comments, i’d be most grateful!!!

    I went ahead and gave this utility a try. I just installed the new nightly. I think it’s great that you’re making it, because I was feeling a bit stranded on pMachine, unfortunately I got some errors.
    Table ‘arghnon_pmac2.wp_post2cat’ doesn’t exist]
    INSERT INTO wp_post2cat (post_id, category_id) VALUES (262, 1)
    SQL/DB Error:
    [Table ‘arghnon_pmac2.wp_posts’ doesn’t exist]
    And so on. It does these for all of the posts, as well as displayin the full post body. They’re in seperate databases, but I assumed your script pulled the wp database info from wp config files (I don’t know much about php). Anyway, if you can tell me what I’m doing wrong, I’d appreciate it.

    It works for me. I need do some adjustments (css etc).
    But… my weblog is in spanish and some characters doesn’t been imported in a correct way. Any sugestions?
    thanks and sorry for my poor english

    Is there any current word on the converter/importer? I’m seriously looking at moving to WordPress but do not want to lose the almost 800 entries and 1900+ comments I’ve got now.
    Thanks
    Stageleft@crow.ws

    well, i do not have much experience with msql, but i figured out that by adding a new column to the “wp_comments”-table i could import all my entries plus the comments without errors:
    just add a column called “user_id” under phpmyadmin, and the above importer works fine!

    Here’s a new version:
    http://zengun.org/stuff/code/import-pmachine23-0.3.phps
    It’s updated to use the current MySQL schema, and thus should just work with WP 1.2.

    Note: because pMachine stores times in an extra-funky-stupid way (localised unix timestamps related to the server’s timezone, I sh*t you not), your posts’ times may just be some hours off.
    You can get around this with a few SQL queries.

    I use different databases for my wordpress and pmachine, and I think that’s why I get all sorts of errors when I run that script.
    Database error: [Table ‘arghnon_pmac2.wp_options’ doesn’t exist]
    I get one of those for each of the wp rows that are supposed to be there, except none of my wp rows are in the arghnon_pmac2 database, so of course they don’t exist. I’m not sure how to go about fixing this.

Viewing 15 replies - 1 through 15 (of 32 total)
  • The topic ‘needs testing: pMachine 2.3 to WP 1.2 converter’ is closed to new replies.