Title: Dotcomments
Last modified: August 18, 2016

---

# Dotcomments

 *  timyang
 * [22 years, 8 months ago](https://wordpress.org/support/topic/dotcomments/)
 * Hi
    Can we import Dotcomments into WordPress? If so, how do we do that? Thanks!
   Tim

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Thread Starter Anonymous
 * [22 years, 5 months ago](https://wordpress.org/support/topic/dotcomments/#post-25234)
 * i have comments already on my blog using another comments feature, is there a
   way to import them easily? there all stored in txt files on my server.
    Thanks
   Chris (www.vandango.co.nr)
 *  [jjohnston](https://wordpress.org/support/users/jjohnston/)
 * (@jjohnston)
 * [20 years, 10 months ago](https://wordpress.org/support/topic/dotcomments/#post-25371)
 * If you are importing from a Blogger site that uses dotcomments, following the
   steps below will allow you to import the comments along with the Blogger posts.(
   No guarantees it will work; it worked for me so I figured I’d post it here in
   case it’s helpful to others.)
 * First, copy the “comments” directory that exists in the root of your old (blogger)
   site to the root of your new (wordpress) site. Then, add the following code to
   wp-admin/import-blogger.php right after where it performs the SQL insert for 
   the post (line 148 in the version i’m using). Then perform the blogger import
   like you normally would; the comments should be included.
 * The code:
 * > `
   >  //========= Import comments ========
   > // get the post id for the row that was just inserted:
   >  $post_id = $wpdb->get_var("
   > SELECT ID FROM $wpdb->posts WHERE post_title = '$post_title' AND post_date 
   > = '$post_date' AND post_content = '$post_content'");
   > // get the comments file and iterate over each comment within:
   >  if(file_exists("../
   > comments/$postinfo[3].comment")) { $comments = file("../comments/$postinfo[
   > 3].comment"); for($j = 0; $j < sizeof($comments); $j++) { // split the comment
   > line into parts: $thisComment = explode('[+]', $comments[$j]); $comment_author
   > = $thisComment[1]; $comment_email = $thisComment[2]; $comment_content = $thisComment[
   > 3]; $comment_url = $thisComment[4]; $comment_date = date('Y-m-d H:i:s', $thisComment[
   > 0]);
   >  // perform the database insert:
   >  $wpdb->query( "INSERT INTO $wpdb->comments(
   > comment_post_ID, comment_author, comment_author_email, comment_author_url, 
   > comment_date, comment_content, comment_approved ) VALUES ( $post_id, '$comment_author','
   > $comment_email', '$comment_url', '$comment_date', '$comment_content', '1' )");}}
 *  [sygyzy](https://wordpress.org/support/users/sygyzy/)
 * (@sygyzy)
 * [20 years, 4 months ago](https://wordpress.org/support/topic/dotcomments/#post-25376)
 * Any updates on how to use this with the latest WP 2.0 import script?

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Dotcomments’ is closed to new replies.

 * In: [Everything else WordPress](https://wordpress.org/support/forum/miscellaneous/)
 * 3 replies
 * 3 participants
 * Last reply from: [sygyzy](https://wordpress.org/support/users/sygyzy/)
 * Last activity: [20 years, 4 months ago](https://wordpress.org/support/topic/dotcomments/#post-25376)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
