Sure looks worth the cash to me.
Sure looks worth the cash to me.
This post will cover a number of points you may also encounter when migrating a site/blog from a proprietary database to a WordPress installation.
There are various reasons why a site or blog may need to be migrated to WordPress. Mine was the simple matter of time. Supporting, expanding and maintaining your own CMS -although very fun- can be an extremely time consuming thing to do. Any idea you would like to present on your site, you yourself would have to develop it.
WordPress on the other hand has a large number of users and developers that constantly generate a steady stream of features, ideas and updates. WordPress itself is written with in expandability in mind and has extensive libraries with Plugins, Widgets and Style templates. Mind you, it still needs work when it comes to defining and deciding on its presentation standards. For example, some templates include the Prototype and Scriptaculous Javascript frameworks, but so do some widgets and plugins. In some cases attempting to load these libraries multiple times will cause them to fail altogether.
Another problem I encountered with WordPress is that some plugins use javascript and capture the Windows.Onload without extending it. This was solved on this site by writing a plugin that allowed for that event to be extended. Existing plugins needed to be edited to facilitate this “standard” way of adding functions to the Windows.Onload event.
Once you’ve decided to migrate to WordPress, you should consider the content you would like to see on your new site. These may include posts, pages, links, RSS generated pages, photo galleries and content-styles (more about that later).
WordPress allows you to import posts using RSS and your links using OPML. There are a number of gallery plugins available and your RSS generated links can be encapsulated in sidebar Widgets.
If you want your migration to be risk free, consider setting up a “beta” environment that you can play with until you feel comfortable enough to switch your site over to WordPress completely. I did this by setting up a sandbox subdomain (wp.0xtc.com) where my wordpress installation resided. Once I was content that the content was fully migrated I switched the directory names of the root and the subdomain on the web server. Mind you, I did have to edit some of the configuration files and update some tables until that step was fully completed, but this was far minor to having to restore a database and file structure in case things didn’t work out.
This is how 0xtc.com was migrated:
UPDATE posts_table SET post_content = replace(post_content,'"/mp/images/','"http://images.0xtc.com/images/')
foreach ($postsInfo as $p) {
$sql = "SELECT *, UNIX_TIMESTAMP(Sent) AS date FROM ".PREFIX."Comments where itemnum=\"".$p[Id]."\" and status=2 order by date desc";
$commentsInfo = $mpage->DoQuery($sql, 1);
$sql = "SELECT ID FROM wp_posts WHERE post_title like \"".mysql_real_escape_string($p[Title])."\"";
$npostId = getstuffdone($sql,1);
if ($npostId){
foreach ($commentsInfo as $c) {
if ($npostId){
$sql = "INSERT INTO wp_comments(comment_post_ID, comment_author, comment_author_email, comment_author_url, comment_author_IP, comment_date, comment_date_gmt, comment_content, comment_approved, comment_agent,user_id)
VALUES
(\"".$npostId[0][ID]."\",\"".$c[Name]."\",\"".$c[Email]."\",\"".$c[SiteUrl]."\",\"".$c[IP]."\",\"".$c[Sent]."\",\"".$c[Sent]."\",\"".mysql_real_escape_string($c[Title].’<br />’.$c[Content])."\",\"1\",\"Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11\",\"0\")";
getstuffdone($sql);
}
}
}
}
UPDATE wp_posts SET comment_count = (SELECT COUNT(comment_post_id) FROM wp_comments WHERE wp_posts.id = wp_comments.comment_post_id)
< ?xml version="1.0" encoding="ISO-8859-1"?>
<opml version="2.0">
<head>
<datecreated>Wed, 02 Jan 2008 19:23:00 GMT</datecreated>
</head>
<body>
<outline text="Church of Reality"
description="If it's real - we believe in it! Tricking religious people into thinking since 1998."
type="link" url="http://www.churchofreality.org/"
category="Religion">
....
</outline>
</body>
</opml>
foreach ($postsInfo as $p) {
$sse = basename ( $p[URL] );
if ($p[Content]==’…’ || $p[Content]==”){$p[Content] = $p[Title];}
if ($p[Title]==’…’ || $p[Title]==”){$p[Title] = $p[Content];}
if ($p[Content]==”|| !$p[Content]){$p[Content] = ‘—’;}
if ($p[Title]==” || !$p[Title]){$p[Title] = ‘—’;}
$sql = "UPDATE `ratemyzi_wordpress`.`wp_ngg_pictures` SET `description` = ‘".addslashes(strip_tags ($p[Content]))."’, alttext = ‘".addslashes(strip_tags ($p[Title]))."’ WHERE `wp_ngg_pictures`.`filename` LIKE ‘%".$sse."%’ ;";
getstuffdone($sql);
}
This post will be updated as I recall more of the strenuous journey that brought me here.Stay tuned.
This site now has mobile capabilities. This means that you can access 0xTC content from almost any mobile device browser.
I have yet to see it in action on a Windows Mobile device, but it works find on my Nokia N95. The gallery, for example works and looks like it was made for this thing.
The current mobile theme will of course be modified to look more like the web version of the site sometime in the future.
There may come a time when you would like to write and compile your own PHP runtime environment on a Windows machine. This article shows you how to do that.
astrumfutura.com/Compiling-PHP-for-Windows-Vista