isso comments uses SQLite. It took me a while to understand what is going on and how to import.
Firstly, the comments.db is not inside docker. That makes things easier. But not too easy.
I have some old comments from Wordpress in a mySQL db. I exported them to ***.csv - cleanend them and used SQLiteStudio on Windows to try things. Then transfered the comments.db back to the server.
Comments where visible in the backend - but not on the pages. What that means is that there is somewhere an error in one of the lines. Most likely in the text
column. Very often this is cause by an apostrophe, i.e. it's
- in SQLite you can write it as it''s
- that will cause no error and formats correctly.
After plenty of csv’ing I gave up csv’ing around and simply left it in the mySQL db.
The SQLite comments.db
has 3 tables comments
, preferences
and threads
. The comments
table is the key one:
isso | wordpress | Notes |
---|---|---|
tid | comment_post_ID | page URL from threads |
id | comment_ID | ID - keep the WP one |
parent | comment_parent | reply ID - keep the WP one |
created | comment_date | isso uses epochtime ! |
modified | set to: NULL | |
mode | approved= 1 | |
remote_addr | comment_author_IP | |
text | comment_content | |
author | comment_author | |
comment_author_email | ||
website | comment_author_url | |
likes | set to: 0 | |
dislikes | set to: 0 | |
voters | set to: 0 | |
notifications | set to: 0 | |
comment_date_gmt | unused | |
comment_karma | unused | |
comment_approved | unused | |
comment_type | unused | |
user_id | unused | |
comment_agent | unused |
The threads
table has the URL information. Note that you must fill the threads
table before you can enter data comments
. comments
will only accept tid
that exist as id
in threads
isso | Notes |
---|---|
id | must match tid |
uri | URL like: /about/ |
title | like: About me |
One note about dates. In Wordpress mySQL the dates are written as 2023-11-22 11:11:56
- but isso uses unix epochtime 1700622715
here are two ways to convert:
|
|
|
|
Since I left the date in the mySQL table I use the PHP method.