But what I really miss is my favorite CMS, Textpattern. So in the interest of restoring some of my historical posts (namely, my Japan trips) and to challenge myself to learn the .NET development stack and Windows Azure platform, I've begun the challenge to recode Textpattern. Okay, maybe not the whole thing, since Azure supports PHP, but at least get it into my RDBMS of choice, SQL Server. So, where to begin?
To easy my way into the Windows development world, I'm going to cheat and start with WebMatrix. It's fast, easy, free and has a one-click installer for everything I need, named:
- WebMatrix IDE
- MySQL 5
- SQL Server Compac 4.0
- IIS Express 7.5
- PHP Extensions for PHP
Getting Your Data Back
Before restoring, I had to brush up on MySQL syntax, but quickly discovered what I needed. First open the MySQL prompt, connecting with the root password you set during the install. Then create a target database:
mysql> create database textpattern;That's all there is to it!
mysql> use textpattern;
mysql> source C:\path\to\mysql-dump.sql;
|I can has data back!|
Connecting The Dots
Next I created a new project in WebMatrix at the root folder of my extracted download of the latest version of Textpattern.
If you'd like to take a look at your data from within WebMatrix, setup a database source connection to MySQL as in the screenshot below.
|Setup a MySQL Connection|
|Look at those pretty tables|
Then, I renamed config-dist.php to match the MySQL settings I had configured, just as if I was deploying Textpattern for the first time.
Launching the Textpattern admin interface for the first time forced a minor schema upgrade. Then switching to the Admin interface, I updated my website URL to match my development environment for relative URIs, and that was all I had to do!
Take a quick look at my 404 page, which is clearly not Apache!
|Definitely not Kansas|