Archive for September 2010

crying-baby-257x300Ouch! I let one of my domain names expire on Tuesday and BAM someone pounced on it. Not normally a big deal unless it’s worth something, this one was. It wasn’t that it was valuable monetarily, however it was the primary domain I used for my Wordpress MU site. I suddenly found myself with a half working website, not good. Took me an hour or so to piece everything back together so I thought I’d share it.

  1. Stop lighttpd
  2. I had to change my DNS records at my provider and update with a new domain to take over for the lost one :( .
  3. Modified /var/www/wp-config.php variable DOMAIN_CURRENT_SITE with the new domain
  4. Modified /etc/lighttpd/lighttpd.conf and replaced the old $HTTP["host"] entry
  5. Unfortunately WP sticks the domain name of your primary site EVERYWHERE in the database which was a real bummer.  After I had found it in more than a few places I decided I’d better dump the database, replace using vi and then import the database back.
  6. mysqldump -u username -p wp_databasename > databasename.sql
  7. I then used vi to do a global replace of the old domain with the new
  8. I then dropped the old database and recreated it with the same name.
  9. Importing the database is easy with mysql -u username -p wp_databasename < databasename.sql
  10. Restart lighttpd

I think that’s it.  It seems to be working again and hopefully this will help someone out of a jam in the future.

Word of caution:  I’d do a backup of everything before I starting and I also can’t promise that this will work if some WP plugin is doing anything strange with the domain name.  Good Luck.

No tags Hide

Copyright by Brent McConnell
Log in

Tag Cloud