WordPress to NodeBB



  • Okay, you guys probably be thinking that I'm crazy. I know that we have a plugin for NodeBB that intergrade WP to NodeBB. However, that's not what I'm looking for. I want to transfer every contents of my site to a NodeBB forum and hopefully the plugin will help me avoid losing traffic by redirecting (301 redirect) any WP post url to the same one on NodeBB.

    Transferring from Blogspot to WordPress could be an example of what I was talking about. Please tell me this is possible. Thanks!


  • Admin

    Well it is possible technically speaking 🙂 @bentael has built an import strategy for NodeBB, which we've been using to migrate data from various forum software. So it would be possible to build something similar for Wordpress content, although it would require a fair amount of work I'd imagine.

    The redirection can be handled via nginx/apache rewrites, which would follow a rule of some sort, totally doable.



  • @psychobunny Sounds positive so far. Could you help me figure out a way or like make a plugin for me? I'm sure in the future other people will also need that too. Thanks



  • @John-Smith The process of making the plugin is just a process of matching table names with table names. Some things you'll want to consider, do you use any shortcodes on your Wordpress site? Or is it a standard blog with comments?

    Any featured images will be lost (unless they'll work as topic thumbnails(which I've never actually seen in a live environment).

    I'll take a look at this (I need to set everything up including wordpress and a sample database, but I will report back with my findings)

    I guess this would be a great time for me to finally create that guide I've been meaning to make for the last 2 months. 😆



  • @a_5mith No I do not use any type of shortcode on my blog. It's just a simple blog with WP built-in commenting system. Nice! I hope you the best 💃



  • Right, it seems possible, that's the good news, the caveat is all of the topics will have 0 views, as Wordpress doesn't track view count. I'm about half way through, I've done the users and the categories. Just doing the actual content now. When it's done I'll need to test it.

    In fact while I'm here, few questions, @psychobunny or whoever else knows, does the timestamp have to be in unix? As Wordpress uses 2014-07-19 17:24:04.

    Also the comments could be an issue due to the lack of a unique pid. But I need to look into it more so it makes sense. 😆



  • @a_5mith You're awesome! To me the views count doesn't matter at all. As long as the contents are transferred and redirect properly.


  • Admin

    yup unix timestamp. easily convertable like so:

    Date.parse('2014-07-19 17:24:04'.replace(' ', 'T'));



  • @John-Smith What's your permalink structure set up like? Post Name? (In Settings > Permalinks)



  • @a_5mith This is my permalink structure setup: /%category%/%postname%.html



  • @John-Smith Ok no problem, you will need to set that when you import, the plugin I'm creating gets your data in a format that nodebb-plugin-import can read. (In theory 😆)

    @psychobunny thanks, so in this case, it would be

    + prefix + 'Date.parse('comments.comment_date '.replace(' ', 'T')); as _timestamp, '
    

    ???

    EDIT: That dark blue really doesn't work for syntax highlighting. I can't see half of it. 😆



  • @a_5mith Wait. Did you just ask me what type do I want or what type I'm currently using. The one I just sent you is the current one.



  • @John-Smith Yeah that's fine, the import process is in two steps, what I've done gets you ready for the import plugin.

    In fact, @bentael does your import plugin work on latest? I know you said it works up to a certain commit, but does it work beyond this?



  • @a_5mith Hey, I was curious about the differences in domains. I mean like will the plugin work if my WP domain is abc.com and the NodeBB is efg.com? Will the 301 redirect work? and stuff like that.



  • @John-Smith You would need to redirect abc.com/%category%/%postname%.html to efg.com/%category%/%postname%.html then when you reached the efg.com domain, it would redirect you to the correct page.



  • @a_5mith Not sure if you get my question correctly. Okay, so let's say my current domain is abc.com and it's running on WordPress. I wanted to move the site to efg.com which is running on nodeBB. Will the redirect works like what you just mentioned?



  • @John-Smith I got what you said. I'll try and put it slightly differently.

    A google search points to
    abc.com/category/postname.html - this is your current wordpress site.

    The redirect process basically looks like this:

    topics: {
            oldPath: '<%=_category%>/<%= _postname %>.html',
            newPath: '/topic/<%= tid %>'
        },
    

    the redirect to access the topic in NodeBB, will only work on it's own domain. So you would need to set up a redirect from abc.com/category/postname.html to efg.com/category/postname.html (even though no wordpress install exists) so that NodeBB will see efg.com/category/postname.html and redirect you to efg.com/topic/tid. 🙂



  • @a_5mith Thanks for the explanation. By the way, The direct process is 301 redirect right? Because I don't want to lose my ranking on Google as well as traffic.



  • @John-Smith 301 is moved permanently. So unless you plan on going back to abc.com at any point, 301 is the correct one to use.

    EDIT: One thing you need to be aware of though is that Bing will not follow a stacked redirect*, however Google will. Bing will re-index your data on efg.com. Whereas Google will use the pagerank from abc.com.

    *stacked redirect - Having 2 or more 301 redirects in a row.



  • @a_5mith In my case, wouldn't it be 2?


 

| |