wget and WordPress

WordPress logo

First off let me acknowledge the love it or hate it relationship that many people have with WordPress. I am not here to convince or sway you one way or the other. It is one of many tools available to get a blog up and running. Having said that, I found myself needing to use it. I wanted to use the command line to grab the latest copy of WordPress.

wget https://wordpress.org/latest.tar.gz

Looks like everything should work out fine. Alas it did not. I got a certificate error below.

--2016-06-07 10:07:06-- https://wordpress.org/latest.tar.gz
Resolving wordpress.org... 66.155.40.250, 66.155.40.249
Connecting to wordpress.org|66.155.40.250|:443... connected.
ERROR: certificate common name `*.wordpress.org' doesn't match requested host name `wordpress.org'.
To connect to wordpress.org insecurely, use `--no-check-certificate'.

Tsk…tsk…WordPress. You guys need to fix that. Especially since your documentation mentions the above command. It was an easy fix. I added the –no-check-certificate to the command and wala. Everything worked as expected.

wget https://wordpress.org/latest.tar.gz --no-check-certificate

--2016-06-07 10:07:39-- https://wordpress.org/latest.tar.gz
Resolving wordpress.org... 66.155.40.250, 66.155.40.249
Connecting to wordpress.org|66.155.40.250|:443... connected.
WARNING: certificate common name `*.wordpress.org' doesn't match requested host name `wordpress.org'.
HTTP request sent, awaiting response... 200 OK
Length: 7770470 (7.4M) [application/octet-stream] Saving to: `latest.tar.gz'

100%[======================================>] 7,770,470 5.71M/s in 1.3s

2016-06-07 10:07:41 (5.71 MB/s) – `latest.tar.gz’ saved [7770470/77704<70]

Afterwards, I untarred the file and had an install of the latest WordPress ready to go.

tar -xzvf latest.tar.gz

I hope someone out there in the interwebs finds this helpful.

You May Also Like