• Some users [including yours truly] have been wondering how to import old Greymatter entries into WP.
    Careful readers will note that WP 0.72 Gold has gm-2-b2.php back in the mix.
    *IF* you have the guts and patience to do it right, here’s how to go about it:
    Grab a copy of b2 and install it.
    Run gm-2-b2.php in b2.
    Run an ALTER TABLE session with the five b2 tables, renaming them to wp_$tablename before starting. [e.g. ALTER TABLE b2categeories RENAME wp_categories;] The b2-2-wp.php upgrade script is not currently noticing and renaming those tables properly, but if you go in and make that change yourself, it’ll be happy.
    Grab a copy of WP 0.72 and install it.
    Run the b2-2-wp.php conversion script.
    Delete b2, as you simply used it as a stepping stone.
    Last step to make you happier [although this is really only applicable for one-poster logs]: run UPDATE wp_posts SET post_author=1 to change all posts to your admin account. You can then delete any users that b2’s GM-conversion script had created, as this has consolidated everything into one account for you. If you have multiple loggers that you’re trying to get, you probably want to go in and run something like:
    UPDATE wp_posts SET post_author=M WHERE post_author=N
    … where M is the old GM author and N is the desired author’s number. [If you have more than one GM log to import, you’ll want to do this.]
    This all seems like a long process, but from grabbing b2 to clearing running UPDATE wp_posts … last night, I spent all of 25 minutes importing 990 GM posts. Worth it to me!

Viewing 15 replies - 1 through 15 (of 27 total)
  • I’ve read your post and I get the following message when trying to import my Grey Matter:
    The importer is running…
    importing users…
    Oops, can’t find any database named here !
    I’d like to follow your instructions if I need to, but where is ALTER TABLES and how do I run a session? I’m completely new to this, am I supposed to edit something in one of the php files? I tried using gm-2-b2.php in order to import.
    Can you give me a more dumb-user-friendly kind of explanation?
    Thanks a lot.

    Sorry, my site is at https://www.jackiefg.com/blog – that’s where I’m trying to get the wordpress going.

    I love an answer to this question also. I am currently running Greymatter 1.21c and would love to be able to import all of the multiuser posts into WordPress.

    Thread Starter gfmorris

    (@gfmorris)

    Jackiefg: are you doing this on a b2 install or a WP install? Please not that gm-2-b2 converts a GM install to a b2 database. As I said in the initial post, you’ve gotta use b2 as a stepping stone while you do the import process.
    Bytes U: I never had any issues with pulling in multiple authors. You just have to point gm-2-b2 at the directory with your gm-authors.cgi file [which will grab all the data you see on the authors screen in GM] and the one with all the entry-related .cgi files.

    I did that and I was/still getting this error msg from gm-2-b2.php…
    The importer is running…
    * importing users…
    Oops, can’t find any database named here!
    [The files are there and I can download and read them!]
    I even copied all the gm-*.cgi files to other folders, re-editied gm-2-b2.php and got the same results. The gm cgi’s were originally 644 so I even chmod files to 777 and still got same results.

    Thread Starter gfmorris

    (@gfmorris)

    Well, let me correct my earlier statement … I never had a problem with it pulling in mulitple single-author logs into one database.
    I’ve never tested multiple authors.
    The error seems to be in the insertion of the author data into the tables, based on the error message. What is your author table named?

    Please tell me someone has found an easier way?

    import-greymatter.php should take care of everything. If you try it and have problems, let us know so that we can fix it.

    where do I get that file?

    It’s in the wp-admin/ directory of every wordpress installation.

    ok thanks I got it and it worked great!

    I had about 640 Greymatter logs when I recent imported into a fresh installation of WordPress 1.0.1.
    After that, I made several changes to posts. I put them into categories. When I did this, I opened up several WordPress management interface pages at a time in multiple Mozilla tabs. That might have caused a problem.
    In fact, it might have caused the problem below. OTOH, it may be that the Greymatter import failed.
    The problem is that maybe 5-10% of all my Greymatter entries are not in my WordPress blog. I have to add them all back manually. This is a lot of work.
    In conclusion, first, do not open more than one WordPress management window at a time, ever. Second, after doing any Greymatter import, check all of your entries to make sure each one got imported into WordPress.

    The following Greymatter import problem is totally unrelated to what I was talking about in the previous comment.
    Greymatter tracks all entries by number. I used the eight digit number. As a result my posts looked like /log/00000080.html and so on.
    When I installed WordPress, I decided to use the mod_rewrite thing to get nice URLs. I decided to assign URLs in the fashion of /archives/2004/01/01/80/ .
    In other words, I used the numerical format for individual archive entries in WordPress. (I like numbered entries. What can I say?)
    Unfortunately, I failed to delete the sample WordPress entry that you get when you first install. If I had done that, perhaps the following problem would not have arisen. OTOH, maybe it would have anyway.
    The problem is that my Greymatter log entries got imported into WordPress with the numerical URL of (greymatterentrynumber)+1. Log entry 80 in Greymatter is 81 in WordPress, 81 is 82, and so on ad infinitum.
    After completing the Greymatter import, I went back into the Greymatter management interface and edited the individual entry template. I removed everything and basically just put in a header meta tag that would redirect from the Greymatter URL to the new WordPress URL, provided that the log entry numbers were the same. Then I put in enough other HTML to make every Greymatter log entry into a basic 302 redirect page. Then I rebuilt all Greymatter entries. That mostly worked. Due to the Greymatter entry numbers not corresponding with the WordPress entry numbers, though, all of the redirects were broken.
    Fortunately, Greymatter has a built-in variable of {{nextentrynumber}}. This variable returns an “81” for log entry number 80, and so on. Thus, I just substituted {{nextentrynumber}} for Greymatter’s entry number in the meta redirect tag. As a result, all of my redirects are now working.
    (See above for description of other problem related to missing archive entry pages.)
    Conclusion: Greymatter hackery + WordPress hackery = goodness. It would be optimal, though, if the WordPress installation either did not come with a sample entry, or if an option could be set during installation to not install it, or if users would be advised to delete it before importing if that would work as a solution. (I’m not sure that the counter would get reset.) The worthwhile goal is to make old and new log entry numbers correspond after doing something like a Greymatter import.
    I am enjoying WordPress a lot. It is super-powered. Thank you.

    I have good news. The problem related to missing archive pages I mentioned above was caused by user error (my own), and not WordPress.
    In the middle of putting my old archives into categories (after the Greymatter import), I realized that I should be careful with multiple WordPress management interface pages open in Mozilla tabs. On my slow dial-up link, it would take WordPress a few seconds to process each command. I began waiting until each command was processed before I made changes on the next entry page. For all those entry pages I changed after I switched to this method, none were lost.
    Thus, the cause of the lost pages was user error.
    It would be nice if WordPress could somehow detect multiple simultaneous database writes from the management interface, and block them, giving an error message. That would prevent this form of user error from causing problems, but it might be more trouble than it would be worth.

    Hi everyone,
    sorry if this is a silly question, but any idea what the following errors when doing a greymatter -> wp import could be?
    Warning: Invalid argument supplied for foreach() in /usr/home/kasprzak/public_html/blog_new/wp-admin/upgrade-functions.php on line 567
    Warning: Invalid argument supplied for foreach() in /usr/home/kasprzak/public_html/blog_new/wp-admin/upgrade-functions.php on line 637

Viewing 15 replies - 1 through 15 (of 27 total)
  • The topic ‘Greymatter Import’ is closed to new replies.