0

I have about 1400 html files and I want to upload them in a wordpress site where I am administrator. I want to publish them as blog posts. How can I achieve that automatically? Thank you.

14
  • Can you provide a bit more detail? For example, what are you trying to achieve with the html files? Commented Apr 16, 2019 at 15:15
  • 1
    Do the HTML files contain only the post content, or do they include things like header, footer, navigation? If they're stripped down to only the HTML you would want inside the post content itself, you could write a script to open, read, and publish a post for each one, or you can look into import plugins - not sure if any exist for straight HTML, you might have to pull them into a CSV with more details such as the post title which is also required.
    – WebElaine
    Commented Apr 16, 2019 at 15:20
  • 1
    You'll probably need to write a script for that, none of the no code importers are going to handle that level of complexity. I would suggest using something like WP Utility Script Runner for that
    – mrben522
    Commented Apr 16, 2019 at 15:58
  • 1
    Loop through all the files, grab content and add it to a new post usingwp_insert_post
    – mrben522
    Commented Apr 16, 2019 at 16:00
  • 1
    check out the WP Utility Script Runner link I posted earlier. You can write the script for that in PHP, FTP it into a utilities folder in your theme and run it with that plugin. there's an example script in the plugin files you can check out to see how it works
    – mrben522
    Commented Apr 17, 2019 at 19:21

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.