Cloudflare Domain and WordPress.com

Once logged into your Cloudflare account click (+ Add a Site) and type in your domain. With your site active click on DNS and adjust your records as shown below.

Cloudflare DNS records for a wordpress.com site.

You will want to create a CNAME record with example.com (your domain) under Name and lb.wordpress.com under Content.

Create a second CNAME record with www under Name and example.com (your domain) under Content. This will forward http://www.example.com to example.com.

Allow a few minutes for Cloudflare to update the records.

Notice: Using Cloudflare in front of your WordPress.com site will affect WordPress.com stats. That information will now be in Cloudflare analytics under your active site. Information collected is different between WordPress.com stats and Cloudflare analytics.

Cloudflare Domain With 1 Click App Ghost Blog

Once logged into your Cloudflare account click (+ Add a Site) and type in your domain. With your site active click on DNS and adjust your records as shown below. The key at this point is to make sure the Proxy status is set to DNS only. This example shows setting up a basic root domain and not a subdomain.

The A record is your root domain and the public IP address to your Ghost Droplet.
The CNAME record sets the subdomain www to point to your root domain.
The MX records will need to be added if your domain has email active.

The next step is to create a Ghost Droplet (1-Click App) within DigitalOcean Marketplace.

Below are the options that I selected to setup the droplet.
Plan – Standard
$5/month virtual machine
Add Volume – None
Choose a datacenter region that is closest to you.
Select additional options – I selected monitoring for additional metrics on the vm.
Finalize and create

Once logged into the Ghost Droplet the install process with ask for two items. The first is the root domain http://example.com and the second is an email address for the free Let’s Encrypt SSL certificate.

Your Ghost blog should now be available at your domain http://example.com

Having Cloudflare set to DNS only allows the Let’s Encrypt process to complete the SSL certificate setup process. Once it’s complete go back to DNS and under Proxy status enable the cloud icon to Proxied. With this enabled the site will now be served through the Cloudflare CDN network.

Cannot Boot VHD Virtual Disk After Resize Process Froze

I have seen this scenario before where admins will power down a VM to edit the VHD. The issue is that after a few hours the expand progress will just hang at a specific percentage. I have also read that some admins will go into task manager and kill the MMC process to stop it altogether. Stopping the MMC process can end up corrupting the VHD file. Here is a way that I was able to recover a corrupt VHD file in this scenario.

I used the VhdTool.exe from Microsoft. Below are the three items that it can do.

VhdTool.exe /create [/quiet]
VhdTool.exe /convert [/quiet]
VhdTool.exe /extend [/quiet]

Create: Creates a new fixed format VHD of size.
WARNING – this function is admin only and bypasses
file system security. The resulting VHD file will
contain data which currently exists on the physical disk.

Convert: Converts an existing file to a fixed-format VHD.
The existing file length, rounded up, will contain block data
A VHD footer is appended to the current end of file.

Extend: Extends an existing fixed format VHD to a larger size.
WARNING – this function is admin only and bypasses
file system security. The resulting VHD file will
contain data which currently exists on the physical disk.

To fix the VHD file I used the Extend command.

Command Prompt
Vhdtool.exe /extend “c:\data\example.vhd” “161061273600”

The new size needs to be in bytes. 161061273600 = 150 GB

It extended the .vhd and then I was able to mount to the virtual machine.