Mobile version (Display Regular Site)

Skip to: Navigation | Content | Sidebar | Footer

Weblog Entry

Some Notes

September 23, 2003

Switching your base technology, and some pitfalls to avoid.

When you search for a very specific piece of information you don’t yet know, and your own damned site is the first that pops up in the results, you will groan.

When you check the link because you can’t resist and actually find the very answer you’re looking for on your own damned site, you will groan louder.

PHP is a snap, except when it isn’t. See for example the recommended reading list every fourth refresh or so. What. Ever.

OS X use continues to be joyful. Building a PHP-driven site one weekend on a Mac, which was formerly an ASP-driven site on a PC makes one feel gleefully subversive.

.htaccess files are a must. If you don’t have them, move to a server that will let you. Do it, and don’t look back.

Using an old Movable Type installation to generate an .htaccess file when completely re-mapping your URL archiving scheme is genius, and very necessary.

MySQL is probably great, and wonderful, and hoorah. Don’t try to build a MySQL-driven site in a single day when you haven’t yet learned a thing about it.

Don’t ever try to move a Movable Type install without first exporting all your entries through the interface and saving your templates. Trust me: never.

Hosting your site on a static IP will save your life one day. Do this.

If you switch hosts, don’t stop paying the former until you are sure everything is moved over to the latter. Burning bridges is not advised.

Even if your broken links are only temporary, provide pages explaining why or you will spend more time responding to e-mail telling you that you have broken your links than you will fixing those links that you broke.

Most importantly: when you are extremely busy and your server goes AWOL and you just don’t have the time to fix it properly, remember that it’s not Armageddon and people will forgive you for a few days of not reading fresh content. They will. They’re good people.

Reader Comments

Quinn says:
September 23, 02h

You sound like you’ve gone through quite a few days of pain with this migration :)

As a fellow OSX/Php/MT blogger, I understand quite well your pains. I’m going to take a deeper look into your htaccess/MT - in the meantime, you may enjoy this as well:

September 23, 05h

speaking of .htaccess and such: i almost always insist on hosting things on servers that have mod_rewrite running and allow me to set up my own rewrite rules. it makes life SO much easier, indeed…i don’t want to go back to the old way (lots of identical pages, all created separately from - ack - a template, or ugly GET parameter riddled urls)…

as we’re imparting wisdom, here’s something that i just did the other week and do not recommend: do not, under any circumstance, set up your new 404 page to email you about any missing files/pages after a complete relaunch of a site, and then go off to lunch…unless you want to come back to 3000+ emails. well, at least it did give me a good indication of things people were still linking to that had not been on the live server for over 5 years (!), and gave me a good starting point for bashing out about 2 pages of rewrite rules and “RedirectMatch permanent” clauses…

Dave S. says:
September 23, 06h

Another handy tip, while we’re at it: make darned sure that your custom error page actually exists before redirecting 404’s to it, or you set off a nasty endless loop.

September 23, 07h

Welcome to the side of Reason and Light, Dave. I’m sure things will only get easier and more enjoyable over time.

And if you like .htaccess, mod_rewrite *will* blow your mind.

Darice says:
September 23, 12h

Well I’ve been following your strugle with this site for a few
days. Glad it ain’t me….
Luckily when I decided to have a blog I opted to learn PHP and mySQL to roll my own weblog. And my webhost was
just a lucky shot; the cheapest with all those features you
mentioned above. (knocking wood right now)
Well good luck with getting your site working 99% :-)

September 24, 01h

Dave, what´s wrong with PHP and Windows? ;-)

Glad to see you got through with the migration “ok”

patricia says:
September 24, 01h

This is a nice, helpful list. I feel a little guilty over how much amusement I’m getting out of the first two statements however. I feel this need to apologize to you as I’m sure it probably wasn’t so much fun for you. :D

As for Dreamhost. I use them and I’m constantly amazed at all they offer for their low prices. I’ve recommended it to several friends and they haven’t disowned me yet so I think that’s a good sign.

Justin says:
September 24, 04h

Dreamcast is offering their top package for $9.99 USD/month. That’s it – good deal, good service, it’s what i’ve been looking for – I am now offically signed up. Hopefully it works for me as well as it has for you guys.

Apparently the deal ends tonight, and it’s only for new customers - like me. I guess if you know anyone thinking about switching to DreamHost, you should suggest they do it tonight if they can. Thanks!

John says:
September 24, 05h

I went through something similar recently; my webhost moved my site from one box to another, and Moveable Type was not happy.

Thankfully, I had my archives on my site still; I ended up writing an AppleScript to pull my content from my pages and paste them into an MT import file. I lost my post ID numbers, and I don’t have comments, so it worked out fairly well. A person with more free time than I might could fix up the AppleScript to grab category info. Between the script and BBEdit, I was back in shape in 48 hours.

The AppleScript is here; if you wanted to use it, you’d have to customize it to your needs, but here it is in any case:

Justin says:
September 24, 09h

Without trying to encourage any spam on David’s fine site, are there some inexpensive ISP’s anyone would suggest that support mod_rewrite? I’m looking at moving the low-bandwidth site of a friend and I’ve never seen mod_rewrite in the list of features offered by my - or any other - ISP. I always assumed that it was only available for those who manage their own server, but not to the average developer. We looking for less-than $10 USD/month, like PowWeb ( I also have a corporate site that would also benefit from this.

Any suggestions?

September 24, 10h

Dreamhost has mod_rewrite enabled. I use Dreamhost, and find their service very good. Some of my friends have had been customers for many years and recommend the company highly.

James N Pope says:
September 24, 12h

PHP is great, especially at the low cost you can find hosting + PHP at nowadays. However, once you taste the power behind Jakarta Tomcat (along with Servlets and JSP), and assuming you can find and afford a decent Tomcat host, you’ll never look back…

For a tiny sample of the power of Servlets, take a look at Filters:

Rik Abel says:
September 25, 06h

Another vote for DreamHost. I’ve been with them for around 3 years and they are just great. Plus, their newsletters are funny.