It has been over a month since my server migration. The fallout included 11-day downtime, termination of my account with GoDaddy (because they are useless support wise), getting into DNS troubles and generally being left alone with www.notenoughtech.com and my Google-Fu. Apart from 63% drop in the revenue and 300.000 lost in ranking (this is savage), server migration created a couple of small problems that I have been ignoring until now.
Not HTTPS ready
The main reason why I have not been able to get the SSL had been the problem with the links in my content. For some weird reason, after the migration, my WordPress installation inherited a server IP in the internal links and the content, while the post articles were sporting a proper domain. So the URL for this article would look like:
http://notenoughtech.com/featured/going-ssl
But pictures and internal links would point to:
http://35.188.28.166/featured/going-ssl
To make this even more confusing, the IP issue would affect only older posts, all new posts would point correctly to a domain-based URL.
After 17 days of Google-Fu (I know this as this is how old is my support ticket with Bitnami) I found a post, in which person described exactly the same issue. Fortunately, the solution was rather easy (always is, unless you don’t know the answer) and a WP plugin Velvet Blues Update URLs would solve my issue in the instant.
old URL: http://35.188.28.166 new URL: http://notenoughtech.com
SSL not so Super easy
A couple of moments later, I was ready to take on the SSL certification with Let’s Encrypt. While the installation and the Bitnami support file is pretty easy to follow, it’s never without issues. The certification failed on me as for whatever reason the location of the created certificates didn’t have the right permissions. I had to do
sudo chmod 775 /foldername
to solve the issue of the certificates not being accessible.
After successfully solving this, and actually using my own paths and details while creating the certificates (always read with understanding all the help files, don’t just copy the sections of the code! duh!) I got the HTTPS up and running…
It was the time to redirect the HTTP to HTTPS – which actually went smooth enough, as all I had to do is modify the wp-config file:
define( 'WP_SITEURL', 'https://notenoughtech.com' ); define( 'WP_HOME', 'https://notenoughtech.com' );
and edit the bitnami config file:
server {
listen 80;
server_name localhost;
return 301 https://$host$request_uri;
include "/opt/bitnami/nginx/conf/bitnami/bitnami-apps-prefix.conf";
}
Your mileage here may vary, as this piece of code depends on the actual deployment method used. After this modification, my website started to show up via https:// prefix. Wait! The padlock is missing, something is not right!
WordPress and mixed content
Turned out (bear with me, I’m new to this) that my installation would apply the HTTPS only to the links, but not images. Serving a mixed content (http and https) is not an option if you want to serve the SSL certified website. Another hurdle to overcome.
It looks like the night is long and full of SSL terror! I used my Google-Fu again to see what can be done about it. Here is another WP plugin for you that will save your website from doom The Search and Replace is a clever little thing to change the values in tables without going to log in to php database.
The substitution was easy, backup the database, then replace:
http: with https:
At this point, you would expect the story to end here. Reloading the page, however, did not return the expected results. The website was still serving mixed content. This time, however, I could see the smoking gun from miles away.
The images from my theme were missing. A good indication of what image path has not been overridden. At this point, I had to go over each picture field in my theme setting page manually, and set it to a correct path containing https:
This was the last change I had to endure before my website had been granted with the well known green secure padlock.
Conclusion
As you probably can tell, I’m not a web admin. Technically speaking, I am now, as this is what’s required to keep the NotEnoughTech running. When I started tinkering with Tasker, I never thought I would end up as:
- web admin
- video editor
- host
- tech editor
- self-proclaimed Tasker champ
- SEO specialist
- PR person
- Social media manager
- B2B sale’s person
- and a couple of more positions I have to fill as required
All of that while holding on to a 50h a week regular office job. Sometimes I sit and wonder, why do I do all this. It’s clearly not making me look any younger. It would be probably easier to keep my desk job and enjoy an extended holiday time. The truth is, I love it. I like learning new stuff, challenge my brain and feel the satisfaction when a problem is solved.
So if you feel like supporting my venture and buying me a coffee – take a look at the options below. There is always not enough coffee in my life.