Scarborough June 2019

Some photos from a very moody June day in Scarborough.

Upgrading WordPress to PHP 7+

Go into CPanel locate the PHP version dropdown and set it to version 7………Thank you very much ladies and gentleman. Good night!

Well not quite. I set mine and promptly received a 500 Server error. Hmmm. So I’d read somewhere about some plugins might cause errors. So back to version 5.60, into the WordPress Admin and I set all plugins to inactive. Back to CPanel, version 7 and same dice. Hmmmm ok. Checked the logs and nothing. I set the php config file to write to the WP-Content log file and nothing (so yeah WordPress wasn’t even being rattled).

Battling with the Webspace Provider

I was determined to sort this. I can’t sit with WordPress on PHP 5.6 forever. I decided to dig deeper and I enabled Remote IIS Admin access via CPanel and started to look through the extensions and confirming everything seemed to match up.

Exporting WordPress to a VM

I wanted to ensure that my WordPress site could play nicely with PHP 7 so I thought I could export the DB via phpmyadmin and take a backup of WordPress then run it on a VM. So I did exactly that. I downloaded a LAMP image from Bitnami

After configuring accordingly and restoring the WordPress DB and installing the WordPress Bitnami Module and restoring by WordPress backup I was in business…..

Success

So clearly my WordPress was fine with PHP 7 and there was something not quite right with my host provider’s setup. Having spent a fair bit of effort on this I had two options 1) Contact host provider and explain issue (this would be painful) 2) Now I have a confirmed full site backup I can take it somewhere else. I went with option 2……

Migrating WordPress to new web host provider

I have some space already with 1and1 hosting and they’ve been successfully hosting the Stranglers forum (which I’ve been running since 1998 – albeit not with them for that entire time). I logged into to Admin and File Manager, created a new folder for the WordPress site, uploaded the archive file of my WordPress files, unzipped that, configured via CPanel. Then over to phpmyadmin (I already have a db running for the forum) and created a new database for WordPress and restored my backup. A quick realisation that I needed to configure the WordPress config file to point at the new DB and I was done. All up and running with out issue and on PHP 7.2

Cleaning up

Finally, all that was left to do was to transfer my domain and SSL cert. The former was simple but there is no way 1and1 will let you transfer in your cert. So I was faced with forking out for another cert with them. Annoying; small potatoes really when I consider where I’d got to.

Archiving Azure Cosmos Data

Having a play with Azure Cosmos DB over the Easter weekend and played with the Azure SDK. The code is a bit slapdash as I was messing with it in Linqpad – it would need knocking into shape if you were to use this in a Production environment.

Creating Documents

Create a dynamic object


Create a loop to get a few documents in the Collection (I’ve included Thread.Sleep to stop my RUs getting chewed up). I could’ve used the indexer and guids to make the data a bit more random,

Migrating data using the “DocumentDB Migration Tool”

Download the Tool

Setup the source as the Cosmos DB








Set up the Target

Hit the big ole Import button and there you go….

Be mindful here that this will have an impact on your RUs so you might want to scale up accordingly and back down once you’re done.

Removing Exported Data from the Cosmos DB

Initially I was thinking of doing this via the SDK and using the _ts to remove data for a specified date range but then I read about the “Time To Live” feature in the Cosmos DB settings. Simply switch it on and enter an amount of seconds.





To confirm the above I created another 100 records, got the sdk to bring me back the total (204). Then set the TTL above to remove the 104 I’d created earlier.

Get a free Google Home Mini

If you’re a Spotify subscriber with a Family Plan you can claim a free Google Home Mini

Here’s mine. Yeah I’ve not unboxed it yet. Don’t really know what to do with it

FTP Server error econnrefused

FTP service up and running on server? Yep

Correct ports and Firewall permissions? Yep

FTP site actually running under IIS? Nope – Fire it up, problem solved.