WordPress to NodeBB



  • @vegetagz6 The exporter would just look for the required data, so users, comments, posts, categories and maybe the tags if it's not too difficult. But your database doesn't include the users, so it won't work as is. You will need to convert your multi site db, back to a clean DB. Other tables are ignored, the import plugin only looks for specific table names in the first place. The plugin would work fine for users with a largely modified forum. But it seems that a multi site import is another step entirely.

    If I'm not mistaken, I believe wp_users would be on the "master" install of Wordpress, then each subsidiary Wordpress site (wp_1_ , wp_2_ , etc) just contains the information for that wordpress. The user accounts would be verified against the "master database", which leads to an issue when you want to take one of those multi site installs, and import it into NodeBB. You would need to merge the master DB with wp_9_, in a way that didn't cause the loss of any posts, then use the importer.



  • Ok converting multi site back to normal wordpress is easy, that can be done.

    But as an ALTERNATE option, won't this plugin work if I exported the required site from a multi site to a normal wordpress installation using wordpress exporter and then go for nodebb export? I think it should work, because a fresh WordPress installation only contains the core tables. So once the users, posts and comments are transferred to a fresh wordpress installation, we can use the nodebb plugin for the final export.



  • @vegetagz6 said:

    Ok converting multi site back to normal wordpress is easy, that can be done.

    But as an ALTERNATE option, won't this plugin work if I exported the required site from a multi site to a normal wordpress installation using wordpress exporter and then go for nodebb export? I think it should work, because a fresh WordPress installation only contains the core tables. So once the users, posts and comments are transferred to a fresh wordpress installation, we can use the nodebb plugin for the final export.

    What I said and what you said were the same thing, so yes. If there's a tool that does it for you, then that would be fine. As long as the final database has all of the tables in this image and they're populated with the right number of entries:

    this one


  • Plugin & Theme Dev

    I don't even mind handling a "multi-site" WP DB, in one exporter, as long as everything is in a single Database, not multi (that would make it really hairy)

    I can add an advanced-custom-config that accepts a extra custom JSON for the exporter in the UI, then plumbs it through to the exporter module, so something like

    exporterConfig = {
      dbhost: 'localhost',
      dbname: 'wp'
      dbuser: 'user',
      dbpassword: 'password',
      tablePrefix: 'wp_',
      custom: {
        // anything you want here, 
        // that would be a result of a JSON.parse(/* what's on an advanced UI field */ )
      
        // in the case of the wp exporter,  a new custom option is introduced to specify which WP site you want to target
        // the UI value would be string '{ "wpsite": "1" }'
        wpsite: "1,2" // that means, site 1 and site 2,   
        // For each Site, the exporter would create a new NodeBB Parent-Category, that's doable too
        // wpsite: "all", // all sites, you guessed it
      }
    }
    

    however, my problem is still the same @vegetagz6,

    where are the users?

    where are the posts?

    is it possible that you might have another database?



  • @bentael I would try and find someone else with a standard WP site, as it's looking like there's at least 12 databases here, if the schema of database numbering is anything to go by.


  • Plugin & Theme Dev

    okay.png,

    @vegetagz6 unless you can figure out the answers to my questions, I don't think i can help you much, sorry 😞

    anyone else has a standard WP DB with some data?



  • Mentioning previous people that wanted this plugin

    @Flexi-Hackify , @Tan-Nguyen , @John-Smith , @Hawon-Nguyen



  • Ok am sending u a standard database, which has all the standard tables like wp_comments, wp_users etc. Check your pm and lemme know 🙂

    Ya the previous database was heavily modified, in the sense that it was part of a multisite installation, and belonged to one of the most active site I have.



  • @a_5mith any updates from Bentael on this plugin, yet?


  • Plugin & Theme Dev

    @vegetagz6 no updates yet - maybe next week, sorry ive been very busy combined with very sick for the past 2 weeks.


  • Plugin & Theme Dev

    wordpress exporter released,

    @vegetagz6
    I only tested against your "dota" db, looks good so far except that you only use 1 out of 2 categories. Your "droid" db had only 2 users..

    Needs more testing of course,

    but can't do much without many DB Dumps,

    I also need to export tags for topics but I need more dumps to test with.


  • Plugin & Theme Dev

    @John-Smith
    @Hawon-Nguyen
    @Flexi-Hackify
    @Tan-Nguyen

    read 1 post up
    To use it, you just need to install https://github.com/akhoury/nodebb-plugin-import and follow instructions in the Admin plugin page



  • @bentael Thank you very much for all of your hard works. What happen to the old post link. I mean will it automatically redirect to the new link (nodebb)?


  • Plugin & Theme Dev

    @Tan-Nguyen nothing redirects automatically, you have to set something in the middle to redirect. The import plugin will provide a map from old to new.

    Read this note: https://github.com/akhoury/nodebb-plugin-import#imported-now-what focus on the redirect section


  • Plugin & Theme Dev

    nodebb-plugin-import-wordpress@0.1.2 now supports importing topic tags - to use it, just use the latest nodebb-plugin-import, and select the nodebb-plugin-import-wordpress from the exporters list (or paste it in the input field) and it will install the latest. As a precaution, uninstall the previous version first
    npm uninstall nodebb-plugin-import-wordpress

    Right now I query all tags and create a map using the topic ids, I know you don't care, but the impact of this is that if you have millions or maybe hundreds of thousands of tags, depending on your machine, you might run into memory issues

    are u a sql guru?

    If you are a MySQL guru and can help optimizing the query, try to answer this question.

    if you need to look at the exporter code, it has more fields to select here than the stackexchange question because I wanted to simplify the question as much as possible.
    https://github.com/a5mith/nodebb-plugin-import-wordpress/blob/master/index.js#L127-L233


  • Plugin & Theme Dev

    even more, now the wordpress gallery shortcodes are supported, with the old post ids, i.e. [gallery ids="123,456,789"] shortcodes can be converted to, either, <img> tags, if you want a gallery plugin, you can then use @psychobunny's nodebb-plugin-gallery, or you can just convert the ids to full URLs which then you can use within your own plugin.

    read this section for more details
    https://github.com/a5mith/nodebb-plugin-import-wordpress#gallery-shortcode-note


Log in to reply
 

Suggested Topics

| |