{"id":829,"date":"2004-05-20T14:33:16","date_gmt":"2004-05-20T18:33:16","guid":{"rendered":"\/?p=829"},"modified":"2018-04-17T21:03:32","modified_gmt":"2018-04-18T01:03:32","slug":"wordpress","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2004\/05\/20\/wordpress\/","title":{"rendered":"WordPress"},"content":{"rendered":"<p>This blog now runs on <a href=\"http:\/\/www.wordpress.org\">WordPress<\/a>. It was surprisingly easy to install, and the Movable Type importer worked well except that it didn&rsquo;t fill in the post_date_gmt&nbsp;column. My Movable Type permalinks were of the form:<\/p>\n\n<pre>\n&lt;$MTArchiveDate format=\"%Y\/%m\/%d\/\"$&gt;&lt;$MTEntryTitle dirify=\"1\" trim_to=\"25\"$&gt;.html\n<\/pre>\n\n<p>This translates to:<\/p>\n\n<pre>\n\/%year%\/%monthnum%\/%day%\/%postname%\/\n<\/pre>\n\n<p>in WordPress. The differences are that WordPress uses hyphens instead of underscores and that it doesn&rsquo;t trim the title to 25 characters. So, to keep my old permlinks working, I changed the WordPress slugs for the imported posts to the Movable Type format:<\/p>\n\n<pre>\nUPDATE wp_posts SET post_name = SUBSTRING(REPLACE(post_name, '-', '_'), 1, 25)\n<\/pre>\n\n<p>I also changed line 183 of wp-blog-header.php to make it not delete underscores from the slug in the URL:<\/p>\n\n<pre>\n$name = preg_replace('\/[^_a-z0-9-]\/', '', $name);\n<\/pre>\n\n<p>Finally, after some mod_rewrite fun, all the links from Movable Type should still be valid, and they should permanent-redirect to the new, cruft-free URLs.<\/p>\n\n<p>For the record, I think Six Apart makes a good product. I&rsquo;m <a href=\"http:\/\/bradchoate.com\/weblog\/2004\/05\/15\/mt3\">not upset by their price increases<\/a>, nor have I been <a href=\"http:\/\/diveintomark.org\/archives\/2004\/05\/14\/freedom-0\">itching for something under the GPL<\/a>. I simply prefer WordPress.<\/p>","protected":false},"excerpt":{"rendered":"<p>This blog now runs on WordPress. It was surprisingly easy to install, and the Movable Type importer worked well except that it didn&rsquo;t fill in the post_date_gmt&nbsp;column. My Movable Type permalinks were of the form: &lt;$MTArchiveDate format=\"%Y\/%m\/%d\/\"$&gt;&lt;$MTEntryTitle dirify=\"1\" trim_to=\"25\"$&gt;.html This translates to: \/%year%\/%monthnum%\/%day%\/%postname%\/ in WordPress. The differences are that WordPress uses hyphens instead of underscores [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"2018-04-18T01:03:34Z","apple_news_api_id":"94d43bfd-3f05-4afb-bb12-e692614c99c4","apple_news_api_modified_at":"2018-04-18T01:03:35Z","apple_news_api_revision":"AAAAAAAAAAD\/\/\/\/\/\/\/\/\/\/w==","apple_news_api_share_url":"https:\/\/apple.news\/AlNQ7_T8FSvu7EuaSYUyZxA","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[2],"tags":[1660,1659,96,740],"class_list":["post-829","post","type-post","status-publish","format-standard","hentry","category-technology","tag-movable-type","tag-this-blog","tag-web","tag-wordpress"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/829","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=829"}],"version-history":[{"count":1,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/829\/revisions"}],"predecessor-version":[{"id":21271,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/829\/revisions\/21271"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=829"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=829"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=829"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}