I have not been posting much the past few days because I’ve been busy at work writing a detailed Textpattern importer for WordPress. This import script, should it be included in the core source code, will allow Textpattern bloggers to make the switch to WordPress.
We even have Textile, guys! Come on in, the water is nice!
But we don’t have to wait for the code to be dropped into the source. It is a part of the official WP 2 code now. Simply
# “Download textpattern.php”:http://trac.wordpress.org/file/trunk/wp-admin/import/textpattern.php
# Edit your Textpattern database details
# Rename textpattern.php
# Upload to wp-admin/import (replace existing)
# Login to wp-admin
# Click on Import > Textpattern
# Change Log
Some details provided during the import, but that you should also know before running.
h3. Users
You have already setup WordPress, but you also have users in Textpattern. We have taken care to import all of your users into our system. Unfortunately there is one downside. Because both WordPress and Textpattern uses a strong encryption hash with passwords, it is impossible to decrypt it and we are forced to assign temporary passwords to all your users. *Every _imported_ user has the same username, but their passwords are reset to password123*.
h3. Preserving Authors
Secondly, we have attempted to preserve post authors. If you are the only author or contributor to your blog, then you are safe. In most cases, we are successful in this preservation endeavor. However, if we cannot ascertain the name of the writer due to discrepancies between database tables, we assign it to you, the administrative user.
h3. Textile
Also, since you’re coming from Textpattern, you probably have been using Textile to format your comments and posts. If this is the case, we recommend downloading and installing “Textile for WordPress”:http://www.huddledmasses.org/2004/04/19/wordpress-plugin-textile-20/. Trust me… You’ll want it.
Enjoy.
v0.1 (Nov 23, 2005)
* Initial Release
v0.2 (Nov 25, 2005)
* Utilized WP API to insert links, cats, posts, comments and users
* Reinvented some WP API functions to assist in import
* Added link import
* Optimized code (Can anyone figure out how to make post/comment portion run in under 30 seconds???)
* General aesthetic improvements
v0.3 (Nov 28, 2005)
* Moved $txpdb to after first step to prevent importer page from crashing for non-Textpattern importers
v0.4 (Nov 29, 2005)
* Gettext improvements
* Moved TXP Database Connection settings to user submitted form
* Stored TXP database connection settings in options table
* removed global txp database connection object and replaced with per function connections
* Removed ADDDATE() function from MySQL queries to prevent MySQL version < 4.1 issues


Add New Comment
Viewing 62 Comments
Thanks. Your comment is awaiting approval by a moderator.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
I am completely new to WP and just do not find where in admin panel is the "import" function....
thanks
Pascal
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
WordPress database error: [You have an error in your SQL syntax near '"INTERVAL 1 HOURS") AS post_date_gmt, ADDDATE(LastMod, "INTERVAL 1 HOU' at line 15]
SELECT ID, Posted, AuthorID, LastMod, Title, Body, Excerpt, Category1, Category2, Status, Keywords, url_title, comments_count, ADDDATE(Posted, "INTERVAL 1 HOURS") AS post_date_gmt, ADDDATE(LastMod, "INTERVAL 1 HOURS") AS post_modified_gmt FROM txp_textpattern
any idea?
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
"WordPress database error: [You have an error in your SQL syntax near 'FROM txp_textpattern ' at line 15]
SELECT ID, Posted, AuthorID, LastMod, Title, Body, Excerpt, Category1, Category2, Status, Keywords, url_title, comments_count, FROM txp_textpattern"
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
WordPress database error: [You have an error in your SQL syntax near 'FROM txp_textpattern ' at line 15]
SELECT ID, Posted, AuthorID, LastMod, Title, Body, Excerpt, Category1, Category2, Status, Keywords, url_title, comments_count, FROM txp_textpattern"
Do you already have an account? Log in and claim this comment.
SELECT ID, Posted, AuthorID, LastMod, Title, Body, Excerpt, Category1, Category2, Status, Keywords, url_title, comments_count, FROM txp_textpattern[/code]
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
So IF you followed my instructions and by doing so you still are getting an error, then I want to see the modified code.
Do you already have an account? Log in and claim this comment.
return $txpdb->get_results('SELECT
ID,
Posted,
AuthorID,
LastMod,
Title,
Body,
Excerpt,
Category1,
Category2,
Status,
Keywords,
url_title,
comments_count,
FROM '.$prefix.'textpattern
', ARRAY_A);
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
WordPress database error: [You have an error in your SQL syntax near 'FROM txp_textpattern ' at line 15]
SELECT ID, Posted, AuthorID, LastMod, Title, Body, Excerpt, Category1, Category2, Status, Keywords, url_title, comments_count, FROM txp_textpattern
Done! 0 posts imported.
Do you already have an account? Log in and claim this comment.