So anyways, purely from a technical perspective, although things have gone a little rocky, it’s certainly nothing to complain about and mostly nothing really too difficult – maybe just some annoyances to sort through thus far…

For what it’s worth, I think part of it is simply the planning, though – if I had demanded that the other accounts got cut off just as soon as everything was copied over to the new server, most everything would actually be dark right now, but because I’m giving myself a few weeks to slowly move things over one site at a time after they’ve been tested on the new server, it should really help to minimize the actual downtime that anyone will see by just redirecting the name servers from one working server to the other. Sure, it means I’m technically paying double for hosting this month until I cancel the other accounts, but the peace of mind while we work through weird, little issues here and there is well worth it!  :mrgreen:

Anyways, the layout is a total of three accounts right now:

  • a shared hosting account with InterServer (most of my sites are here)
  • a shared hosting account with Host Gator (a couple of random projects here)
  • the new VPS account with InterServer (everything ultimately needs to end up here)

The first couple of days of the transition were actually pretty easy (I actually purchased the account on Thursday), as InterServer offered to migrate my shared account with them over to the new VPS server themselves. I found after browsing around the new server interface that this is actually a feature built right into cPanel where you can migrate entire accounts from one place to another, so I was very happy to find that all of my mail, FTP, distribution lists, DNS settings, etc… were all copied over identically because I had a feeling that was going to be a pain in the ass if I had to do it manually.  Files are one thing, but I really didn’t want to have to recreate all of that other stuff all over again.

Next was switch over a couple of domains at the registrar level to test the waters – luckily, I found that I had one for an old project that had an empty WordPress install that I just never got around to using, so that became my test domain because nobody would notice or care if it was unavailable anyways! Ended up getting some weird WordPress errors that only worked by manually upgrading to the newest version (mind you, I had already done this automatically – like I said …  weird!), but now by the end of the day, I’ve officially got four sites moved and plan to do the real ones spaced out over the next week or two.

A summary of weird stuff that I’ve had to work through:

  • Sometimes cPanel doesn’t like me moving entire directories with WordPress installs – it will copy everything, but then error out trying to delete them afterwards. Or if I do delete them, when I refresh some select sub-folders and files will just magically reappear.
    • Solution: Login to the server via SSH and delete them from the command line. This can be done recursively for deep directories by using rm -rf /mydirectory/.
  • In copying files from my other shared account, rather than copying it all locally and then re-uploading it to the server, I found this cool command (again, via SSH) to remotely connect to the other server to mass-copy files. Final result: Downloaded: 4056 files, 113M in 3m 49s (504 KB/s) – woohoo!
    • Solution: wget -r ‘ftp://username:password@ftp.servername.com/path/to/your/files/’
  • Another weird thing I’ve been seeing with cPanel is that there are a couple of folders that were migrated over from my old site that just flat out aren’t visible when I try to access them via the web, even when permissions for readable folders are exactly the same.
    • Solution: No idea why this works, but simply creating a new folder and moving everything into that seems to work, although I still ended up having to delete the files manually via the command line like I described above.
  • A bizarre one for WordPress – after moving two sites, one worked completely fine and the other threw this error all over its admin interface – Deprecated: Assigning the return value of new by reference is deprecated in /home/…/wp-includes/class-simplepie.php on line 738. I tried everything from upgrading to the latest version (3.3.1), copying class-simplepie.php over from the working install, disabling all of the plugins, changing themes, looking into RSS (because simplepie is a parser for RSS) – no luck.
    • Solution: Did a complete manual upgrade of WordPress and the errors just disappeared. Mind you, it wasn’t really an “upgrade” because that install was already on the latest version, but it flushed out something that was causing problems.
  • Speaking of weird WordPress stuff – even more bizarre, I had an install where I couldn’t add tags to any of my posts. I tried the trick I described previously, as well as adding some PHP Pear modules that weren’t enabled on the new server, but no dice.
    • Solution: Surprisingly, a plugin that had absolutely nothing to do with the admin interface was somehow still interfering with it, because disabling them all and then adding them back until I eventually found the culprit made it go away. Luckily, it was one that I wasn’t even using anymore, so I was able to just delete it and move on without looking back!

One other thing that I’m trying to do through all of this is really clean house and take care of some bad practices like directory structure, database naming, unnecessary FTP accounts that I’ve slowly built up over the years. I’ve got data for well over a dozen sites when you count the ones that are no longer around, so I’ve started by organizing the files themselves into a number of categories – personal, writing, justlaugh, etc… This completely breaks the original add-on domain routing that cPanel had for most of them, but it’s no big deal now to just re-create them pointing to the new home directories for each site.

I’ve also got sites that were for whatever reason setup in sub-directories of other sites, so whenever possible, I’m pulling those out and categorizing them in the same buckets as their parents.

Databases … I’ve got 21 MySQL databases between these two shared accounts, so I’m not only weeding out the junk ones that I don’t need anymore, but also renaming them to match the domains that they belong to as I go. Same with users – there’s no reason that I need a separate WordPress user for every single one, so I’m creating one master ID that has access to all of them and them updating the individual WordPress installs as I move them over. All of this is a little tedious, but definitely necessary if you saw my MySQL menu in cPanel!

FTP accounts … well, I don’t use FTP to get into the individual sites, as I have a master account that has access to the whole server, so these are all just an unnecessary security risk. Apparently cPanel automatically creates an FTP account for each new domain that you add to DNS, so I’ve had to go through and delete them all manually afterwards. Also learned that apparently anonymous FTP was enabled!, so I killed this in WHM (cPanel Web Host Manager).

I think that’s basically all of the nuts and bolts of it for now. After the first four, I feel like I’ve got a fairly decent groove built up for knowing what to look out for and moving things where I ultimately want them, so now it’s just a matter of finding the time to knock them out one by one. I’m only doing one or two this week – mainly because I’ve got another project that really needs to get finished up first – but slow and steady, at this rate by the end of March everything should be running smoothly in its new home and not only will I be able to cancel both of the other shared accounts, but we’ll also truly find out if I actually bought enough CPU to handle all of this stuff running in one place on its own!  :mrgreen:

Leave a Reply

Your email address will not be published. Required fields are marked *

© 1999 - 2017 Comedic-Genius Media, All Rights Reserved.