When my site was attacked by comment-spam bots (sounds like science fiction, eh?) this week, I was forced to restart my server quite a few times before thwarting the attack. I actually think that I somehow corrupted the database or a file within WordPress because after the event, the site wouldn't last more than a few hours or so without going down.
I took advantage of the opportunity to move my site to a new account on my reseller account at Jumpline.com. I've been ecstatic with Jumpline over the years. I host about 30 websites and almost never get a call from the clients who host with me (unless they need help). The service is remarkable and their support team is fantastic.
Their support techs were actually the guys who identified that it was some spam-bots that were killing my site (Thanks!). Moving to the new account now puts this site on the latest version of PHP/MySQL and has a really nice Ajax Webmail application.
What I didn't realize is what an incredible pain it was to try to do a clean installation of WordPress. Many of the plugins out there add fields and tables to your WordPress database. I am constantly evaluating with plugins so my database was a disaster. Executing a WordPress or database backup and restoring it on the new account was probably just going to move the issues with it. At minimum, it was going to throw a bunch of additional fields and tables in there. I'd like to see future versions of WordPress mandate database modifications when deactivating a plugin so the garbage isn't left behine.
I even looked at some additional plugins that would output your WordPress blog to XML for re-import, but then you lose a lot of data. Twelve hours later (I did sleep) and I think I've actually completed moving the account and all of the applicable data, though. It was a bit of a nightmare, but here's what I did:
- Backed up the original site and database.
- Installed WordPress from scratch on the new account.
- Installed the latest WordPress plugins from scratch on the new account.
- Set all of the plugin options and site settings.
- Did a table comparison of every table from the source database and the destination database.
- Deleted all fields in the source database that did not exist in the destination database.
- Emptied all tables in the destination database (ridding yourself of the standard WP test posts.
- Did an export of each table without drop and recreate. This will write the records to the new database with the same keys so none of the relationships are broke.
- Copied my wp-content\upload folder from the source account to the destination account. Since I moved the domain name as well, all image references were maintained.
- I ran the blog and tested it! I did have to clean up some page permalinks, I'm not sure why, but they were okay afterwards.
It's interesting that WordPress has built-in Imports for competitive blogging platforms, but no import to execute a WordPress to WordPress import that will disregard plugin modifications.
That pretty much did it. You may notice I'm running a new theme. I was simply having too many small issues with the beta theme that I was running. I've done some extensive customization of this theme but I think I've almost got it where I want it.
My only complaint with the theme is that the author did not implement a common footer throughout the theme that resided above the bottom >body> tag, so I had to manually input my Google Analytics script throughout. I could have built a custom footer and referenced it, but I think later I would have got confused since the theme's author used the name ‘footer' on everything. It is a very nice theme, though!
I guess I'm back up now! Now I have to get to work!