Redirecting the old forum urls to the discourse

I am trying to migrate from WordPress based forum to Discourse .

My old url is like this

And in discourse I see topics are created with uri

So I copied entire content from my old forum to new forum
Im not that techy so I don’t wanted to take risk I have about 18 posts so I didn’t went with any scripts . I copied all the content manually.

Now my question is how can I redirect
My old forum links which are already indexed in search engines.

I tried permalink feature to redirect , but still I am not able to redirect

Did I missed something? Anywhere please guide me with the correct procedure

1 Like

See admin -> customize -> permalinks. You can create a redirect from the 18 old URLs to their new topics.


I tried unfortunately they are not redirected

Any help? This is not working for me

1 Like

I have written a plugin to do so.

Change the above to:
get '/question/:slug', to: redirect('/t/%{slug}')


Thanks will try and let u know

1 Like

I cannot imagine why not, but it’s impossible to tell without more information about what you did. I cannot imagine why you’d need a plug-in, though. For 18 you can just create them by hand, though you could possibly use a permalink normalization to do them all at once.

Edit: permalink works only for incoming links, not links within discourse. What is usually done is to rewrite those links in the posts.

I was redirecting my old forum urls to discourse one. Dont know why its not working for me.

i wanted to confirm
suppose my old url is 1.
and discourse one is 2.

i have to enter this 1. in New field and 2 in destination field am i right?

Sry for dumb question!

You’d enter must-read-rules in the URL field , leave the “topic ID” selected, and put 47 in the topic ID field. Like this:

1 Like

The redirect option under customize option is not working for me.

How can I make it work?

Are you trying to use it to redirect inbound links to discourse content, or to redirect links within discourse (i.e between pages).

1 Like

Right! Permalink works only for incoming URLs. I bet this is the problem.

1 Like

@pfaffman @Stephen Im migrating from wordpress to discourse. I m redirecting my old urls to discourse generated urls.

ex: to

Inbound links will be redirected by the permalinks feature. Internal links between posts will need to be corrected to reflect their new destination, permalink redirection won’t work there.

1 Like

What are the possible ways to make it work?
the first url was my previous wordpress forum one and second url is my discourse one
How can i redirect successfully.

Can u please tell me how can i edit the code any guide? i installed the plugin but i didnt found specific area which u are referring to edit the slug?

1 Like

Tried unfortunately not working :pensive:

You’ll have to fork the plugin.

1 Like

Can I add multiple urls there?
Or only structure of url?