Moving WordPress

I’ve been running two WordPress sites for several years on 1 & 1 web hosting.  Last year I made a major restructuring of eBabble and in doing so created a new SQL 5 database to keep it separate.  Early this year on eBabble Art I received an error when trying to upgrade WordPress past 2.8.2: that was the last version that would work on a SQL 4 database.  It wasn’t a big deal so I left it at version 2.8.2 and kept going.

wordpress logo stacked rgb1

With WordPress 3.0 released I decided to finally move eBabble Art to a new SQL 5 database and WordPress 3.  I searched around and found lots of directions for moving a site to a new database but decided to go my own route.  Here are the steps I performed:

  1. created a new folder on my host called comicart
  2. created a new SQL 5 database on 1 & 1
  3. installed WordPress 3.0
  4. installed my plugins
  5. copied my theme folder
  6. configured widgets
  7. changed permalink, links and media
  8. copied my images folder that contains all my uploads
  9. exported eBabble Art, edited XML file and imported it to comicart
  10. checked every page to make sure all the images were displaying
  11. redirected subdomain art.ebabble.net to comicart folder
  12. configure plugins

It looks very straightforward and it was.  I made a new folder on my host and installed WordPress so I could run the old site and the new site concurrently, comparing settings so everything would be the same.  Plus I didn’t have to worry about losing any files or experiencing any real downtime.  I installed the plugins but didn’t activate or configure most of them since the domain would be changing from www.ebabble.net/comicart to art.ebabble.net once everything was ready.

1 & 1 has a feature called WebSpaceExplorer (yes there are no spaces) that lets you create a Zip file of a folder and have it on your host.  This let me Zip up my images folder, move it to comicart and then upzip the folder, all without having to copy things via FTP to my PC and back again.  Very nice.

I copied my theme folder over since I had made changes to the header and footer and didn’t want to do it again; why do the work again when you don’t have to.  I recreated my widget layout, links list without incident but when it came to permalinks I received an error saying .htaccess wasn’t writable and I would have to manually edit it: the text was provided and again illustrated that WordPress is a very user friendly platform.  Unfortunately my .htaccess was writable and no amount of checking and tinkering could get my permalink settings changed within WordPress so I bit the bullet and manually made the changes.

Exporting and importing is very simple and covered the bulk of my site: posts, pages, comments.  WordPress 3 makes you install an importer plugin first which is new for me since it was built in before, but I’m getting ahead.  Once I had the XML export file I opened it in Notepad and did some replace text.  Most of my images linked to http://art.ebabble.net/images but some were to https://ebabble.net/art/images so I replaced all those.  As well I had manually added rel=”lightbox” to the images and I replaced that with a space as I wanted a plugin to handle that automatically.

WordPress media settings

Until now I had manually created my thumbnail images: it started when WordPress way back when didn’t handle images well and just continued.  This time around I wanted WordPress to handle it for me.  My thumbnails were 200 pixels at their largest, either width or height, and my main images were 800 pixels at their largest.  I didn’t need medium-sized images so I set those to 0 and unchecked crop thumbnails to exact dimensions.  A few test uploads showed everything was working as I wanted it.

Wandering through every page showed a few images that didn’t seem to get my replace text properly but it wasn’t that many and the fix was quick: adding in http://art.ebabble.net to each image property.

Redirecting the subdomain was very easy with 1 & 1 and was working within two minutes.  At that point, I needed to change the General settings in WordPress to reflect the domain of the site was now http://art.ebabble.net and not https://ebabble.net/comicart anymore.  Quick testing showed I needed to change the .htaccess file again, manually again!  Configured the plugins and my new WordPress 3 installation using SQL 5 was done.  The new site looked the same as the old, all links were the same but I was now up to date and didn’t have to manually edit and create so many image files.  All told it took me about 1.5 hours: well worth it.