We define "text documents'' as content primarily associated with a word processor for manipulation, and many text documents will end up as pages in your WordPress site. The content isn't static in the sense that it's fixed, but it's not part of the blog narrative.
Brute-force is often the simplest approach here. Copy and paste your text, or export a document as HTML and glue that into a WordPress page. Be warned, however, that most word processing applications insert a huge array of embedded HTML tags, local formatting, and other style elements that make the output page render the way it would as seen from the word processor, but not the way you'd want it to within your WordPress theme structure. If you don't want to strip out all but the most elemental paragraph, table, and link information, consider exporting the file as raw text and then hand-editing it to match the style of your other pages. It's ugly, but so is removing half of the document in the form of HTML directives. Even something as simple as the MacOS TextEdit application uses custom HTML tags for paragraphs if you ''Save As'' an HTML document. Save your text, without any formatting.
A variation on this theme is merging wiki entries into a blog. Most wikis have their own somewhat arcane syntax, different enough from HTML to make copy and paste time-consuming but not worth automated editing unless you're moving a large wiki. If the wiki is really a collection of topics, it makes sense to migrate the wiki pages to WordPress posts, creating categories for each topic or set of topics and relying on tags to even more finely identify the content. The upside to migrating out of a wiki is that you gain use of the WordPress metadata functions, and can parse comments and discussion into comment threads rather than endless edits to the wiki document; the downside is that you lose the edit history contained in platforms like MediaWiki. If you're running a wiki with a MySQL database as the repository, you can use the custom extract and import script discussed later in this chapter to build a migration tool.
Was this article helpful?