As I’ve said before, I’ve tried to keep a local version of my site mirrored to my online version. This isn’t unusual for a lot of developers; it helps to stage your site, it allows you to make mistakes with little impact on the outside world and it allows you to be productive away from an Internet connection.
I’ve been fairly successful at doing this with WordPress 2.x. The new version seems to be a somewhat different story. My typical method of duplication is to:
- Copy the site folder from on location to another
- Copy the MySQL database with the following changes:
- Change references from www to my local MAMP server (www.wellys.com to wellys.com:8888)
- Change file location references as well (/Home/Username to /Users/Shared)
- Change the wp-config file for the proper local information
Not this time with 3.0:
- The Header didn’t change to my custom header
- The menus didn’t change to my custom menus
So far (cross fingers) those two items seem to be the only issues. Mmmm. I hate it when this happens.
- The image for my header was in my media uploads folder but it wasn’t available to use for the twentyten theme (the twentyten theme only pulls images from your system and not from the media library). So I had to delete the image from my media library then reload it in the theme loader… sigh.
- The menus were setup but not enabled. I simply had to choose the menu in the theme menu settings then save menus and I was up to speed. That was nice.
- In the past, I typically just reloaded the MySQL tables to ensure the two blogs were identical, this isn’t as easy. Instead, I have the same two issues happening again AND I’m starting to get pingbacks from my own site. This is getting to be a nasty mess.
UPDATE (June 5, 2011)
I attempted this again and it really is pretty easy. The specific directions are:
- Export the online wellysblog db into a SQL file.
- Use Textmate toÂ replace all” www.domain.com” to “domain.com:8888” andÂ Â “/home/username/” to “/Users/Shared/” [I use my Shared directory on my Mac for my local websites. Your location may vary.]
- To reset the header image, go to Appearance – Header – Upload Image and use the Choose File area to reselect the desired header image then click Upload. [The db has the right link but it doesn’t load, I do this to ensure it loads my image.]
- To reset the menus, make sure the Theme Locations Primary Navigation is set properly. Appearance – Menus – Theme Locations – Primary Navigation should be set to Categories. [Mine is Categories, set it to what you use.]
As for the pingbacks, that is a necessary evil, I’ll deal with later.