Bulk "Publish to Discourse"

Might be more of a WP question but is there any way to bulk “Publish to Discourse” a large number of posts? I have 200 posts I want to publish to discourse to enable discourse comments but can’t figure out how to access the discourse menu options from the bulk edit feature in WP.

1 Like

There are no Discourse options added to the WordPess bulk edit options by the plugin. It would be possible to develop something to publish your posts through the API, but for 200 posts, it would probably be less work to just publish them to Discourse manually.

2 Likes

That’s what I suspected … thanks.

I know this is an old post, but i’ve done the following to bulk publish:

  1. Configured a default category in “Publishing > Default Discourse Category”
  2. Enable “Auto Publish”
  3. Bulk select posts and re-select “status” to “published”

This will trigger the auto publish feature, despite the fact posts may already be published.

2 Likes

edit: such an operation is not recommended and not supported by Discourse.

Just a general reminder that bulk publish from Wordpress to Discourse using the WP Discourse plugin is not recommended and is not supported. The proper way to handle this is to perform a database migration.

1 Like

Thanks. I did start manually by re-publishing each blog post. But 1 hour in, I realized it would take several days to do it manually.

Are there inherent risk or things I should doublcheck after bulk re-publishing existing blog posts to their connected Discourse topics?

Sorry, but, as mentioned, such an operation is not recommended and not supported. If I were to give you tips on how to do it I’d be encouraging it, which is not what I want to do :slight_smile:

1 Like

I understand. Its already completed. I didn’t know it was not recommended etc, so I was mainly asking if there’s anything I should be aware of.

Of course, if I had known before that it was not recommended etc., then I could have approached it differently. But the above topic history, it does not mention to avoid doing so. I don’t remember seeing anything a long of those lines.

Also, I will remove the script above in the same light, out of respect for that recommendation.

1 Like

This is however built in functionality of the plugin and wordpress, and does work. It’s also the only documented solution for it.

While this can caused an increased load, bulk publishing 5 posts isn’t really anything over the ordinary if auto-published is enabled. If you’re doing hundreds, then its best to do it in smaller 10/25 chunks but there should be a queue/batch processing to ensure no issues but it’s lacking that feature for bulk publishing.

Bulk publishing from Wordpress to Discourse using the WP Discourse plugin is not recommended. I would recommend you handle that such a case with a database migration, which is supported by Discourse out of the box and handled by all Discourse hosting providers, including Discourse.org.

Bulk publishing from Wordpress to Discourse using the WP Discourse plugin is not “built in”, is not documented and is not supported.

I think maybe the reason for bulk publishing posts is a per-use case but it’s overkill for a data migration in our use case for example.

We have a specific category on discourse, which we publish woocommerce products to on creation, so forum members can talk about those specific products for support. No other data auto publishes.

Auto-publish handles all ones going past the point of WP discourse being installed. This is automatically triggered when you edit a post in wordpress or in this example, change the post publish status which can be done on multiple posts at once, therefore meaning wp discourse then Auto-publishes the content as configured to discourse.

WP Discourse auto publish is a feature, so unsure what the concern is.

I’m glad WP Discourse auto publish is working for your case.

The concern is that folks will come here, read this topic and think “how bad could it be?”. Yes, in some specific cases like yours using auto publish in that way probably won’t cause many issues if you know what you’re doing. However in my experience folks will be creating more trouble that it’s worth by trying solutions within the “bulk publish” rubric. I’ve had to untangle such attempts in the past. As such, “bulk publishing” (which is not auto publishing) is not documented, not supported and not recommended.

Moreover, the alternative, i.e. a database migration, is what most people need when they start to consider “bulk publishing”, however most people have an (understandable) preference for GUI solutions, and an (understandable) aversion to databases, so, in my experience, there is a natural bias to be overcome here. There is actually a simple and supported solution to most people’s problems in this area, if that natural bias is overcome.

If folks want to discuss more specific cases, like yours, they’re welcome to create a separate topic in WordPress.