|
Cookbook /
WordpressImportSummary: Import entries form a Wordpress Blog into PmWiki.
Status: Experimental
Prerequisites:
Maintainer: Ian Barton
Categories: Content Management
Questions answered by this recipeHow can I import the content of my existing Wordpress blog into PmWiki? DescriptionI have been keeping a personal diary in Wordpress for several years. I am planning to move the content to PmWiki. This recipe describes my progress so far. Importing entries is a two stage process. First Wordpress entries are exported as xml and saved to a file. The second stage is to parse the xml file and create a wiki page for each entry. In some cases my blog has more than one entry per page, in this case I concatenate the entries into a single page for that day. Wiki pages are created in yyyymmdd format for easy sorting using the pagelist function. At the moment Wordpress categories are ignored completely - this is something I plan to address in the next version. Other improvements are making the page title the same as the blog entry title, although this will cause problems where wiki pages have more than one blog entry. NotesYou need to download two files for this recipe:
Edit both files where indicated to fit your needs. The directory where the wordpress exported xml file and the new wiki pages are created need to be writeable by your webserver. Release NotesThis is very much an experimental release, so expect features and bugs to change on a regular basis:) The method used to clean characters that are not valid xml from the blog body is very crude. If anyone can improve this, please go ahead.
Comments
Is there anything new about the page name == post title feature? See AlsoContributorsThe variable $query has a problem into pmw_convert.php. I modified it: $query = "SELECT ID, post_date, post_title, post_status, post_modified, post_content FROM wp_posts ORDER BY ID ASC"; |