Manually copying over comments from Wordpress, how do I can create user accounts?

I just wrote a plugin for exporting users. It needs a bit of work before it will be safe for a site with 1000 users. So far, it only exports users, but I think exporting posts/categories and comments is also possible. If so, it would be a cleaner solution for dealing with existing WordPress comments than what the WP Discourse plugin is currently doing. It could also be used for sites that want to completely move from WordPress to Discourse.

3 Likes

Thanks so much for this. This is a so good.

Exporting users, posts and comments from WordPress to Discourse works. The issue is that in a live environment the API calls to Discourse will have to be rate limited. That’s a solvable problem, but I’m not sure if it’s better to work on it, or to just develop a WordPress to Discourse migration script. I’ll have to get some advice about that.

I think that the WP Discourse plugin does need to be able to handle exporting large numbers of users. It’s needed for integrating with membership plugins.

3 Likes

@simon I was just looking at WP Discourse plugin (1.4.7). I don’t see this option. Is this not in production yet?

No, I haven’t worked through the problem of dealing will a huge number of API calls.

It sounds like what would work for you would be a full migration of your WordPress site to Discourse. Is that what you are trying to achieve?

1 Like

I want to migrate the comments by preserving/associating them to the wordpress author (by creating discourse accounts for each of them). I was planning to create the user accounts manually. Since there was no way to migrate/synchronize this your comment gave me hope :disappointed:

Sorry, I was getting ahead of myself. A create_discourse_user function is going to be added to the plugin soon, but it’s not going to be setup to handle multiple users. There are a few different ways that it could be used to export a lot of users.

I think a full WordPress to Discourse migration script could be useful. I’ll look into it some more and get back to you.

1 Like

In that case, what does this do?

https://github.com/scossar/wp-discourse-export

It exports a WordPress site to Discourse through the API, but it’s not safe to use in a live environment. It also doesn’t handle multi-level threaded comments correctly - note that the README says Work in Progress.

1 Like

Oh I wish this was complete…

I think the solution is to modify an import script to pull the data over. It typically takes a day to get it done enough to know how much longer it’ll take to finish the job. If you have a budget, you can post in #marketplace or ask me. If not, the simple press importer is a decent place to start.

1 Like

Thank you @pfaffman. I run a small no-revenue blog. Bit scared to post there :slight_smile:

Edit: Here’s the post:

@pfaffman Can you please take a look at [Paid] Migrating old wordpress comments and users to Discourse? If you have a quote, that would help me figure out next steps.

2 Likes

I was wondering whether this feature has been added to the WP Discourse plugin? I mean, does the WP Discourse plugin support exporting all current comments in WP and creating a Discourse account for all the users? It would have been good to be able to migrate all WP comments to Discourse instead of losing them.

Thanks all in advance

1 Like

No, it does not any of those. AFAIK out there isn’t any free (or paid) tools to integrate comments of WP to Discourse. Creating accounts is easier task with DiscourseConnect but then you will loose all other ways to login to Discourse.

And again — I’m more than happy to be wrong again, but with comments I’m not.

1 Like

It’s not a job for that plugin. You need a migration script to convert the WP comments into discourse ones. I started doing this for a client once but they ended up not doing it and I can’t remember the details. I think that I had figured out (maybe there is an existing script?). Creating just the users isn’t too hard. I think I saw such a script in one of my github repos recently. (But I’m on my phone now and don’t think I can manage to look on my phone).

3 Likes

Thanks, @pfaffman. If I can migrate existing comments from WordPress to Discourse, it will really be useful. Have you been able to lay your hands on those scripts?

1 Like

I’m very busy for the next month. If you’ve got a budget, you can see Migrate to Discourse Discussion Platform from your current formum software.. If not, you can look in the import scripts in the source for some ideas or maybe look at my pfaffman (Jay Pfaffman) · GitHub.

2 Likes

Thanks @pfaffman. I will look at those.

2 Likes

Looks like the one I was thinking about used
Discus.

1 Like