Since my server provides ssh access, I made extensive use of it. First, I zipped my old (but then current) installation of WordPress. Then I could download the archive as-is and it would safe in case I messed up. Then I made a new directory for my virtual hosts to pick up on. It was called
blog-ryanrampersad in my top level directories. I ran
cp ryanblog blog-ryanrampersad to copy the contents from one to the other. Wanting to start fresh, I decided to overwrite the contents of the new folder (which contained all the old stuff) with new files straight from the WordPress.org zip.
Then I needed to change my database settings. I downloaded a copy of my database from phpMyAdmin. I used NotePad++ to run search and replace for various things. First my domain switch was replaced and second my new table prefix. After that was settled, I uploaded the old database and that’s about it.
So what’s the Finally Fixed part about? A friend of mine noticed that in really old posts, some images weren’t appearing. It was kind of odd and I wasn’t sure why. I asked if anyone had seen this behavior before on the WordPress Support Forums but I never got any help. Asking on Twitter was actually more productive. I ssh’ed into the two existing directories full of wp-content. To my surprise, the old directory had the proper case (mixed) while the new directory had strictly lowercase file names! I didn’t have an explanation for this though. To be safe, I zipped and downloaded the bad uploads folder and then ran
cp to copy everything back into order.
Honestly, this was kind of ridiculous. WordPress is trivially easy to migrate if you know what you’re doing. This had neither to do with WordPress, the server or me. User error probably was a part of it somewhere, but why would file names magically lowercase themselves?
I did lose some data. It is sad but true. I lost a bunch of comments actually. Any that happened between now and April 1st, when the last safest backup was made. Someone mentioned, always do your own backups don’t rely on automation. I should’ve listened!