Friday, July 03, 2009

Dealing with DreamHost Server Migration

DreamHost sent me an email telling me that my account had been moved to another server. OK, fine - "what's that mean to me, Al Franken?" They said that it shouldn't affect most sites, but that you'd have to look out for paths in your applications that look like "/home/.something/username".
So, when when on my clients emailed me to say that his WordPress site was giving him an error message that read:

Unable to create directory /home/.spuds/user/domain.com/wp-content/uploads/2009/07. Is its parent directory writable by the server?

I knew that I had been bitten by this error. OK, how to fix it? I grep'ed the WP PHP files, but couldn't find a path like that. So where was it coming from?

On a hunch, I decided to look at the wp_options table in the WP database and found a row called upload_path, and sure enough, it contained the offending directory. I just removed the ".spuds" portion of the path, as per DH's directions, and it all worked.

So, if you're on DreamHost, and they moved your WordPress blog, and it suddenly stopped working with that error message, try looking through wp_options in your databse. (FYI, DH puts a random string between the wp and the options to prevent collisions with other users in the same database.)

enjoy,
Charles.

2 comments:

Lucas said...

It was really helpful, i could fix my blog, i love you so much :P

Unknown said...

Just for anyone who should find this post and are experiencing the same issue as I was...

WordPress has simplified access to the setting. In 3.0, it can be found on the Media tab underneath Settings. So it is no longer necessary to edit your mysql database by hand.