A lots will depend on the structure of how the images are stored and how much of the html you want to keep.
There are several different options.
You can take a minimal approach where you keep the html files in place and write a custom template that extracts from the DOM the body content and displays that.
This would mean that that page is displayed inside the WP header / footers, but of course you won’t be able to use WP editor on content.
If you want full conversion you will need to ‘parse’ the html and get that into the database as ‘content’ and load the images into the appropriate ‘media folders ( in uploads ) and adjust the links.
You can do this by coding a specific solution.
However if you are able to manipulate the html to create a structured file ( e.g. csv ) containing the html relevant to the content ( inside body ) and some other basic info like page title there are import plugins that could help e.g. https://ww.wp.xz.cn/plugins/wp-all-import/ ( other plugins are available )
Hi Alan,
Thank you for your reply. Much appreciated. I am a complete beginner though and your solutions may not be suitable for me yet. Besides, I have way more than a thousand html pages and images put together or maybe more to convert – with time-constraints. So, I am looking for something quick, easy and automated as far as possible. I think I have found something, but I am not sure if it will work the way I hope it would. It’s an abandoned / depreciated plugin called “HTML Import 2”: https://ww.wp.xz.cn/plugins/import-html-pages/ . Please let me know if you have any thoughts on this plugin. Thanks again!
-
This reply was modified 4 years, 10 months ago by
moreechika.
-
This reply was modified 4 years, 10 months ago by
moreechika.
Well it might be worth a go on a test system
I read the support threads ( always a god thing to do when considering plugins ) https://ww.wp.xz.cn/support/plugin/import-html-pages/ and two bigger issues seems to stand out
1. Not all images seem to get migrated
2. does not work on php 7 ( but there is a fork on github https://github.com/seanvfs/HTML-Import-2 )