WordPress to NodeBB
-
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.
-
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.
-
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)
-
@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.
-
@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?
-
@John-Smith You would need to redirect
abc.com/%category%/%postname%.html
toefg.com/%category%/%postname%.html
then when you reached the efg.com domain, it would redirect you to the correct page. -
-
@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
toefg.com/category/postname.html
(even though no wordpress install exists) so that NodeBB will seeefg.com/category/postname.html
and redirect you toefg.com/topic/tid
. -
@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.
-
@John-Smith Correct.