WordPress.org

Ready to get started?Download WordPress

Forums

needs testing: pMachine 2.3 to WP 1.2 converter (33 posts)

  1. michelv
    Member
    Posted 10 years ago #

    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

  2. MrPeer
    Member
    Posted 10 years ago #

    yeah ;)

  3. Anonymous
    Unregistered
    Posted 10 years ago #

    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.

  4. michelv
    Member
    Posted 10 years ago #

    - 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.

  5. waterlily
    Member
    Posted 10 years ago #

    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.

  6. waterlily
    Member
    Posted 10 years ago #

    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.

  7. waterlily
    Member
    Posted 10 years ago #

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

  8. michelv
    Member
    Posted 10 years ago #

    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?

  9. waterlily
    Member
    Posted 10 years ago #

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

  10. waterlily
    Member
    Posted 10 years ago #

    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!!!

  11. arghnoname
    Member
    Posted 9 years ago #

    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.

  12. javier
    Member
    Posted 9 years ago #

    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

  13. Anonymous
    Unregistered
    Posted 9 years ago #

    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

  14. torsten
    Member
    Posted 9 years ago #

    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!

  15. michelv
    Member
    Posted 9 years ago #

    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.

  16. arghnoname
    Member
    Posted 9 years ago #

    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.

  17. nclement
    Member
    Posted 9 years ago #

    when running the import script the following error is received:
    Invalid query: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use

  18. nclement
    Member
    Posted 9 years ago #

    when running import-pmachine23-0_3.php a blank page is shown. No errors, no nothing.
    What is not correct about this?
    Neil

  19. Anonymous
    Unregistered
    Posted 9 years ago #

    I keep getting parse errors. Is there a way I can get the raw php file? Being a Mac user, I believe the errors are due funky line breaks and all that when I copy the file and paste it.
    Yours,
    Francis

  20. Anonymous
    Unregistered
    Posted 9 years ago #

    Another error I got was:
    Fatal error: Cannot redeclare sanitize_title_with_dashes() (previously declared in /Users/francis/Sites/wordpress/wp-includes/functions-formatting.php:87) in /Users/francis/Sites/wordpress/wp-admin/import-pmachine.php on line 70
    Yours,
    Francis

  21. oculos
    Member
    Posted 9 years ago #

    Well, this script ROCKS!
    The user should notice, however, that some errors might happen. It imports your previous pmachine blog address, so many things can break on your new blog. It's advisable to use phpmyadmin to fix this, as well as adding a new category because somehow the script removed my only category.
    Also, there's an error due a function that was already declared, so it's cool to remove it so the script works.
    It did a great job for me.

  22. halr9000
    Member
    Posted 9 years ago #

    Worked for me. I had to remove that duplicate function as indicated above. I went in and deleted all my users except for my new wp admin account and then all my posts disappeared! I re-ran the script, and while it gave errors, it did exactly what I expected and put the posts back in.

  23. Anonymous
    Unregistered
    Posted 9 years ago #

    This worked fine for me, first time through, except I can't use it for production until the pMcode (BBCode) conversions are "de-neutered."
    I have too many links and bits of markup in pMcode, through hundreds of entries, to try to fix them all by hand or through search-and-replace.
    Any word on when this might be done?

  24. Anonymous
    Unregistered
    Posted 9 years ago #

    I take that back. I CAN use this, thanks to the BBCode PlugIn. I installed and activated it, and all the pMcode stuff now works.
    Never mind ... ;-)

  25. blu_matt
    Member
    Posted 9 years ago #

    Aside from the need to have the tables for the conversion in the same database (easily rectified with a simple export->import with mysqladmin) this was a straightforward and painless procedure.
    Thanks!

  26. Success
    Member
    Posted 9 years ago #

    Any update to this import script?

  27. Success
    Member
    Posted 9 years ago #

    Can someone explain more on what blu_matt said about the simple export?

    What to import and what are the commands?

  28. vasu
    Member
    Posted 9 years ago #

    will this work with WP 1.5?

  29. pepsifreak
    Member
    Posted 8 years ago #

    Has anyone tried this script with Pmachine Pro to WP1.5?

  30. chocojun
    Member
    Posted 8 years ago #

    Thanks!
    But there are some problem at encoding. The transfered log has two different encoded text, ex)euc-kr & utf-8.
    And it has posted time error both entries, comments. It was different with original times.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.