Just over 48 hours ago I updated the DNS settings and initiated the switch to the new server. Other than a slightly misconfigured Cloudflare CDN everything has gone smoothly. This is in part due to my experience of having done this a couple of times now, and in part due to the excellent and clear controls that SiteGround offers behind the scenes.
For much of the last two weeks I’ve focussed on two things:
- Redesign my website (garethjmsaunders.co.uk)
- Migrate that site, this blog, my SEC digital calendar site, and the NYCGB alumni website to a new web host (SiteGround).
I’ve managed to complete the project three days early… well, kind of.
WordPress… we have a problem
One unforeseen snag has been to do with the media (images, PDFs, zip files, etc.) on this blog.
I’ve been using WordPress since version 0.7 in 2003. During that time I’ve been uploading image after image, and as WordPress changed the way that it stored images I’ve experimented with different ways of organising it—even simply uploading the images to my server via FTP. I must have tried about four or five different arrangements.
For the most part, though, I’ve been uploading files directly into /wp-content. Occasionally I’d switch on the “organise my uploads into month- and year-based folders” option.
In short the organisation of media on this blog has been a mess, and I’ve always shied away from addressing it because… well, it worked.
When I came to consider migrating this blog from Heart Internet to SiteGround I did think about the media: would it be a problem if I simply transferred everything over as is and sort it out there.
I was a fairly tight schedule (it had to be completed by 20 January so that my Heart Internet hosting account wasn’t renewed) and I reckoned that since it worked fine at Heart Internet then it should work at SiteGround.
I was wrong.
cPanel and the mystery of the 1,998 files
SiteGround uses cPanel. As Wikipedia explains, “cPanel is a Linux-based web hosting control panel that provides a graphical interface and automation tools designed to simplify the process of hosting a web site.”
cPanel uses Pure-FTPd, a free (BSD licence) FTP server which by default shows up to 2,000 files in each folder. I found that out after the event tucked away in the cPanel documentation.
I had 3,688 files plus 10 directories in my /wp-content folder and I couldn’t figure out why it would only display 1,998 files and the previously visible directories, such as /plugins and /themes had disappeared.
I am manually working my way through the media library. Uploading files into the appropriate /wp-content/uploads/<year>/<month> directories and updating the database to tell WordPress where the files are.
For those files that were uploaded before there was such a good media library I’m using the Add From Server plugin to quickly import media into the WordPress uploads manager.
This is going to take a while, so please bear with me.
Monday 19 January 2015
I’m making good progress already. I’ve fixed 360/700 images in the media library. That’s 51%, just over the halfway mark.
I’m finding it strangely satisfying getting this sorted out. A bit of website gardening.