Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
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.
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.
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
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
wp_insert_post