moving things over to dreamhost

the impetus being my impeding move across the country and my desire to be posting from the road (when able). for those who forget, i’ve been hosting justinsomnia.org at home since last july, which would be impossible once my stuff is all packed up.

of course it only occurred to me after i dropped $60 on a dreamhost account ($50 setup + $10/month) that i could have just moved things over to ibiblio. for free.

the obligatory howto:

  1. tar up webfiles. easier said than done. i’ve got 452MB of photos in gallery out of 470MB in my total webspace. this took awhile to do on my lil’ via epia box.
    tar -cf justinsomnia.tar *
  2. sftp to my server from dreamhost and get the tar file. go over to jane’s house and watch good bye lenin!, fingers crossed that the whole 470MB moves across the wire. the first time i tried this over night it stopped after 334MB.
  3. dump the wordpress database to file. this is when i discovered that wordpress had been storing 4800+ automatically blacklisted spam comments, roughly 22MB’s worth.
    SELECT COUNT(comment_ID) 
    FROM wp_comments 
    WHERE comment_approved='spam';

    so i deleted them. warning: use caution with delete queries!

    DELETE FROM wp_comments 
    WHERE comment_approved='spam';

    finally i dumped the database (this time a more manageable 3MB) and sftped the file to dreamhost.

    mysqldump --opt -p wp > wp.sql
  4. untar the web files
    tar -xvf justinsomnia.tar
  5. inject the wordpress sql into a dreamhost mysql database i had set up
    mysql -u jwatt -p -h mysql.justinsomnia.org justinsomnia < wp.sql
  6. edit the wordpress database configuration values in wp-config.php
  7. update any absolute path references to the new file locations on dreamhost (various header include files in my wordpress and gallery template)

and that was pretty much it. except my .htaccess file didn’t get included in the tar file so i had to go back and get it. and i couldn’t get to wordpress’s admin interfaces (from my temporary subdomain url) because it kept redirecting me to my existing domain (still being hosted at home). so i had to go poking around in the wp_options table (after grepping the hell out of the wordpress files) and make the change manually.

UPDATE wp_options 
SET option_value = 'http://justinsomnia.dreamhosters.com/wordpress' 
WHERE option_name = 'siteurl';

if you’re seeing this post, then everything has gone well, and the new dns settings have propagated—which i’m about to go and do.

update: everything seems to be working from my roadrunner account this morning. before i went to bed, i updated godaddy (my domain registrar) to point to dreamhost’s nameservers and deleted the zoneedit “zone” for justinsomnia.org. all in a night’s work.

5 Comments

I hate GoDaddy. Just so you know.

well, if i’m still using dreamhost when my registration runs out, i should be able to transfer it to dreamhost for free.

I had a frustrating experience with Godaddy re their nasty email policies which I wrote up on my site. I suggest everyone think twice before falling for the Godaddy “cheapest deal”, which will cost you more for other reasons. I have a discount code listed on my review page. Thanks.

Tom

As a company get larger they tend to do worse in caring for the little guy. I must admit that Switching to dreamhost is much better.

[…] an awesome blog about moving WordPress to Dreamhost.  This guy does exactly what I wanted to […]

Care to Comment?

Or if you'd prefer to get in touch privately, please send me an email.

Name

Email (optional)

Blog (optional)