WordPress.org

Ready to get started?Download WordPress

Plugin Directory

HTML Import 2

Imports well-formed HTML files into WordPress pages.

My title imported, but the content was empty! (Or vice versa.)

You didn't find the right HTML tag that surrounds the content you wanted to import. Open up one of your old files in a browser and use its inspector (or Firebug) to select the content you want. Look for the tag that surrounds that content and find something unique about it. (An ID attribute is best, but anything unique will work. If it's a table cell, a unique width will do just fine.) The enter the tag name, the attribute name, and the attribute's value into the separate boxes in the Content section of the importer's options page.

See the User Guide for details and examples.

Does this work on Windows servers?

Yes! Let me know if you encounter any problems.

Will the importer duplicate the design of my old site?

No. The importer simply extracts the relevant part of each HTML file and copies it into a WordPress post. You'll need to create a custom theme if you want to preserve the site's appearance as well as its content.

Will this work on large numbers of HTML files?

Yes, it has been used to import over a thousand pages, and did so in a couple of minutes. However, you might need to adjust PHP's max_execution_time setting as described below.

I import a few files and then the script times out. What can I do?

The importer will attempt to work around your server's max_execution_time setting for PHP (usually 30 seconds), but some servers don't allow this. You can try to increase it by adding a line to your .htaccess file:

php_value max_execution_time 160

If that gets you further but still doesn't finish, just increase the number (it's in seconds). However, note that your host might get irritated with you for hogging the server's resources. If you have a lot of files to import, it's best to install WordPress on your desktop (XAMPP for Windows and MAMP for Macs make it pretty easy) and do the heavy lifting there.

It's also quite possible that the script is trying to use more memory than your server allows. You can try to change that setting, too, in .htaccess:

php_value memory_limit 1024M

Should I remove 'images' from the list of skipped directories if I want to import images?

The skipped directory setting just tells the importer where to look for HTML files. Linked images will be imported no matter where they're located.

Requires: 3.0 or higher
Compatible up to: 3.5.2
Last Updated: 2013-5-3
Downloads: 75,028

Ratings

4 stars
4.2 out of 5 stars

Support

0 of 6 support threads in the last two months have been resolved.

Got something to say? Need help?

Compatibility

+
=
Not enough data

1 person says it works.
0 people say it's broken.

100,1,1
67,3,2
50,4,2
60,5,3
100,1,1
50,2,1
100,1,1
50,8,4
0,2,0
33,3,1
100,1,1
100,1,1
100,2,2
100,2,2
0,1,0
100,1,1