One of my favourite new Google Chrome extensions (plugins) is Momentum.
Momentum replaces the default Chrome ‘new tab’ page with a beautiful image that changes daily, the current time, plus an inspirational quotation, the weather, and an optional to-do list.
I never used to use the shortcuts on the default new tab page, so I find this page much nicer. It’s fun, it’s friendly, it opens really quickly (unlike other new tab replacements that I’ve tried) and it’s inspiring, not just because of the quotation at the foot of the page, but the image giving you a 24 hours glimpse into another beautiful part of the world.
Over the last few months in the evenings and at weekends, I’ve been working on redesigning the Pittenweem Properties website for friends here in Anstruther. The site launched a couple of weeks ago.
Pittenweem Properties offers high-quality self-catered holiday accommodation and property management services in and around Pittenweem. They currently manage properties in Carnbee just outside Anstruther and Pittenweem. But their portfolio is growing and for good reason — the properties they own and manage are to a very high standard and in a beautiful part of Scotland: the East Neuk of Fife.
The WPMU DEV article recommends that you add the API code below the comment /* That's all, stop editing! Happy blogging. */ but I prefer to add it below the define() block for Multisite. But you can add it where you like, really.
Add the following code define('WPCOM_API_KEY','abcde1f23456');
Save wp-config.php and upload it to your site.
Your wp-config.php file will then look something like this:
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.
I’ll try the method I used before, which was to delete all the core WordPress files and upload them again manually, but in the meantime I found this WordPress plugin has done the job: Missed Scheduled.
By default the plugin is set to run every 15 minutes, but I’ve changed mine to 2 minutes by editing line 12:
define('MISSEDSCHEDULED_DELAY', 2); // Number is in minutes, change it according to your needs
If it turns out that uploading the files manually fixes the issue again I guess I’ll be running manual upgrades in future.