{"id":897,"date":"2008-12-08T23:53:44","date_gmt":"2008-12-08T15:53:44","guid":{"rendered":"http:\/\/www.nargalzius.com\/blog\/archives\/2008\/12\/08\/wordpress-vs-mt-revisited\/"},"modified":"2008-12-08T23:53:44","modified_gmt":"2008-12-08T15:53:44","slug":"wordpress-vs-mt-revisited","status":"publish","type":"post","link":"http:\/\/nargalzius.com\/blog\/archives\/2008\/12\/08\/wordpress-vs-mt-revisited","title":{"rendered":"WordPress vs MT revisited"},"content":{"rendered":"<p>Now that it&#8217;s been a while since the blog started being powered by WordPress, I figured it was the time to do a comparison of the two systems.<\/p>\n<p>I guess the short of it is that if you don&#8217;t need plugins that much&#8230; MT would be the better system. It&#8217;s highly configurable on it&#8217;s stock setting. In other words, you probably can do most content &#8220;filtering&#8221; with a base install of MT, while you&#8217;ll be needing a bunch of plugins on WP to accomplish the same things.<\/p>\n<p>Having said that though, if you need lots of &#8220;special&#8221; functionality, WordPress can be a practical choice because of the sheer activity of the plugin development community.<\/p>\n<p>For the next post, I&#8217;ll be evangelizing a certain plugin-architecture that I think may benefit a lot of WP plugin developers. I&#8217;ll also drop some code in to extend and make it more useful. In the meantime, I&#8217;ll go through my general opinions of the new system after the switch.<!--more--><!--\/\/--><\/p>\n<h1>The Good<\/h1>\n<h2>Speed<\/h2>\n<p>As I&#8217;ve mentioned before, I use <a href=\"http:\/\/illuminex.com\/ecto\/\">Ecto<\/a> to blog. I love it so much that I&#8217;ve purchased a license for it. I even crafted custom <a href=\"http:\/\/farm4.static.flickr.com\/3119\/3082065713_fe017720f7_o.png\">CSS preview templates<\/a> for it to match my blog&#8230; so that when I&#8217;m drafting my stuff, I have a general idea of how the final thing would look like when posted on the blog.<\/p>\n<p>Anways, with MovableType, I was setup using a static page-generation system (which looked like a good idea at the time). As such it takes quite a while to publish or revise a post as it waits for a confirmation if all processes involved (page generation, index rebuilds, etc.) have finished &#8211; this usually takes about half a minute.<\/p>\n<p>With WP being all <code>php<\/code>, the posting\/revisions, etc. all take about 3 seconds. <\/p>\n<h2>Footnotes<\/h2>\n<p>The footnotes plugin for WordPress is <strong>much more<\/strong> elegant than in MovableType. I used to make footnotes this way:<\/p>\n<pre><code>... a sentence#[fn1]\n\n[fn1]: this is a footnote.<\/code><\/pre>\n<p>Now I simply have to type in (without the spaces between the parentheses):<\/p>\n<pre><code>... a sentence ( (this is a footnote) )<\/code><\/pre>\n<h2>PHP driven<\/h2>\n<p>MovableType was mostly done in perl. While, I&#8217;m not going to claim one language is better than the other, I personally prefer WordPress being a <code>php<\/code> driven system because I <em>know<\/em> <code>php<\/code>. In fact, during the migration, I was able to hack a bunch of WordPress plugins to suit my specific needs easily&#8230; which made the transition easier (and much faster) as a whole.<\/p>\n<h2>Plug-ins<\/h2>\n<p>Just like I said earlier, WP has a very active development community and plugins are popping up left and right. You&#8217;ll notice that a plugin that wasn&#8217;t included in my old engine is the <em>Twitter<\/em> plugin, which displays my recent tweets right in the blog&#8217;s main page. I&#8217;ll actually have another post discussing some hacks I did which may be useful to other WordPress users.<\/p>\n<hr \/>\n<h1>The Bad<\/h1>\n<h2>Low level design concepts<\/h2>\n<p>Like I said, MT had a superior way of &#8220;approaching&#8221; the way data was being processed. The move to WP frustrated me in a sense that a lot of the plugins are self-contained. It&#8217;s hard to explain, but I&#8217;ll try in the form of an example.<\/p>\n<p>WP has what they call <em>The Loop,<\/em> which is basically the equivalent of the <code>&lt;MTEntries&gt;<\/code> tag. What happens here is that any other subcommands that are executed within that tag\/loop is specific to the entries being pulled. Now the thing with MT, is the filtering plugins usually act like their <strong>own<\/strong> <em>The Loops.<\/em> Because of that, and because the MT developers approach things that certain way, it&#8217;s commonplace to be able to use plugins <em>within<\/em> plugins with minimal incindent.<\/p>\n<p>To demonstrate: recall the <a href=\"http:\/\/farm1.static.flickr.com\/54\/180517119_61e6091b02_o.jpg\">archiving section<\/a> on my old home page. The layout from that was done by using a bunch of plugins together.<\/p>\n<p>The way I did it was something like do a &#8220;the loop&#8221; of the entries of a given year&#8230; then do <em>another<\/em> &#8220;the loop&#8221; through all those entries, this time grouping the months&#8230; then <strong>within<\/strong> that [monthly] loop, do <em>another<\/em> &#8220;the loop&#8221; of the entries to take the numbers of entries. etc. etc. It was basically a plugin made out of other plugins&#8230; but the difference is I didn&#8217;t have to modify <em>any<\/em> of the existing plugins to accomplish that output.<\/p>\n<p>It&#8217;s damn near impossible to do that without making your own custom plugin script to format stuff the way you want to. So now you see the watered down archiving system I have in the main page &#8211; which is basically just a dropdown list \ud83d\ude41<\/p>\n<h2>Post revisions<\/h2>\n<p>Talk about database clutter! All you WordPress users who have just been simply posting and never bothered looking at the actual database&#8230; now&#8217;s the time to check it out. See how much useless crap is generated just by saving a minor revision.<\/p>\n<p>Luckily, WordPress has provided a killswitch for it, but it&#8217;s not an &#8220;option&#8221; you can toggle on and off. According to their stats, out of 200k installations, only 30-50 actually take issue of having such a useless feature. Hence they decided to do the whole: <em>you can kill it if you really wanted to, but you&#8217;ll have to know what you&#8217;re doing<\/em> approach. Here it is:<\/p>\n<p>open <code>wp-config.php<\/code> and add the following code above or below the <em>lone<\/em> <code>define<\/code> clause:<\/p>\n<pre><code>define('WP_POST_REVISIONS', false);<\/code><\/pre>\n<p>Problem solved!<\/p>\n<h2>Primary Categories<\/h2>\n<p>This is just stupid. I&#8217;m not quite certain what was going on the developers heads to exclude a simple way of setting a primary category. While there are plugins that can accomplish this, you&#8217;d have to use the web-interface to set everything.<\/p>\n<p>Luckily I found out that through Ecto, if you post using one category initially, it sets that as a primary category. Given how quick it is to revise a post, then I just make an immediate edit and include the other categories.<\/p>\n<p>Still, it&#8217;s quite baffling why this simple thing wouldn&#8217;t be included as a core feature&#8230; again, I attribute this to poor lower level design concepts.<\/p>\n<hr \/>\n<h1>The Ugly<\/h1>\n<h2>Custom Permalinks require post slug or id to work properly<\/h2>\n<p>All my archive permalinks used to be stored in the format: <code>http:\/\/nargalzius.com\/blog\/archives\/YYYY\/MM\/YYYY_MM_DD_HHMM.php<\/code>\nSure, not it&#8217;s hardly the most efficient folder\/naming scheme. But it worked and it was unique enough (since it was impossible for me to post more than one post in a given minute. Simply put, that sort of URL is already unique enough to identify a post. Unfortunately this breaks with WordPress. I <em>have<\/em> to have a post ID or a title slug appended at the end for it to work properly.<\/p>\n<p>This sucks because now <strong>ALL<\/strong> my old permalinks don&#8217;t work anymore even if they legitimately are unique enough not to confuse any rewrite rules setup by any system. As such, part of my transition phase is <a href=\"http:\/\/farm4.static.flickr.com\/3054\/3082071733_c70f58873d_b.jpg\">constantly adding redirects<\/a> in my <code>.htaccess<\/code> file&#8230;<\/p>\n<p>I&#8217;ve installed a plugin that gives me an RSS feeds of all <code>404<\/code> (file not found) errors. I strip out all the errors made by spiders and bots and take the &#8220;normal ones&#8221; which are probably made by normal surfers&#8230; and add them to the list. So the next time that particular url is entered, it will redirect to the new permalink&#8230; until the time when all search engine caches are updated with the new links (which is probably a long time from now.<\/p>","protected":false},"excerpt":{"rendered":"<p>Now that it&#8217;s been a while since the blog started being powered by WordPress, I figured it was the time to do a comparison of the two systems. I guess the short of it is that if you don&#8217;t need plugins that much&#8230; MT would be the better system. It&#8217;s highly configurable on it&#8217;s stock &hellip; <p class=\"link-more\"><a href=\"http:\/\/nargalzius.com\/blog\/archives\/2008\/12\/08\/wordpress-vs-mt-revisited\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;WordPress vs MT revisited&#8221;<\/span><\/a><\/p><\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false},"version":2}},"categories":[4,5,9,13],"tags":[473,595,791,810,893,911,1303],"class_list":["post-897","post","type-post","status-publish","format-standard","hentry","category-general","category-internet","category-nargalzius","category-technology","tag-general","tag-internet","tag-movabletype","tag-nargalzius","tag-perl","tag-php","tag-wordpress"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[],"_links":{"self":[{"href":"http:\/\/nargalzius.com\/blog\/wp-json\/wp\/v2\/posts\/897","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/nargalzius.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/nargalzius.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/nargalzius.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/nargalzius.com\/blog\/wp-json\/wp\/v2\/comments?post=897"}],"version-history":[{"count":0,"href":"http:\/\/nargalzius.com\/blog\/wp-json\/wp\/v2\/posts\/897\/revisions"}],"wp:attachment":[{"href":"http:\/\/nargalzius.com\/blog\/wp-json\/wp\/v2\/media?parent=897"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/nargalzius.com\/blog\/wp-json\/wp\/v2\/categories?post=897"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/nargalzius.com\/blog\/wp-json\/wp\/v2\/tags?post=897"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}