Updating website domains and subdomains
I have been using Freenom.com for free domains for quite a few years, recently it has shut down and put all my active domains into a ‘pending’ state that does not allow the domains to work.
Because of that my 6 or 7 sites have all become inaccessible. I also have a Home Assistant App that links to one of the domains and so I can’ use the app for that either. Its like all my windows on the world have had all their curtains closed, or the windows bricked up.
The sites are blogs and demo sites and a woo commerce site as well as other information sites. Not having them means I can’t share them.
So I looked around for a couple of free alternatives, one I found offered sub-domains to exisrting sites but I could only have them initially as http not https as the LetsEncrypt had issued too many certificates for the main site (inc sub-domains) so I decided to bite the bullet and purchase a domain for Cloudflare.com.
I did this for a few reasons:
- I use Cloudflare CDN already for my sites to distribute them around the world and found their free services reliable and they also offer a lot of services
- They automatically create a HTTPS version for the site without you having to do one for the Domain elsewhere
- I don’t need to re-direct namespaces for the new domain to cloudflare as they are already the default ones
- I can create a tunnel for my Home Assistant App instance on the cloudflare site directly using the cloudflared add-in in Home Assistant
So I looked at purchasing one from cloudflare and got a domain for $8US (13.50$ NZ) for a year so I’ll have all my stuff on subdomains on that site, and started to set them up.
Now have vast (blog), demo (pir2), cv(madrake), photos (imaginary), but trouble for image4 and apriori sites, apriori does not connect to DB and the other one just doesn’t seem to find site.
I Decided to just have Vast site as max-drake.cc and then all the rest as subdomains. The vast site needs a bit of work on it too.
Sites to keep running why?
I put a lot of effort into these sites over time and there is a lot of content.
They are hosted on my VPS (Virtual Private Server) that I’ve had for years.
One of the main reason for keeping them up and running is the fact that I tend to revisit projects and having the information of issues I’d identified when did them previously helps speed things up when I revisit them.
They have also been of use to others , my YouTube videos have now had over 135,000 views at the time of writing this article, and most are about me trying to do specific projects.
Remapping WordPress Domain to new
Most of my sites are WordPress sites so I need to configure the database to use the new domain names rather than the original domain names .
I came across a wordpress article that showed how to change the name of the domain in the
UPDATE `wordpress814`.`wp_options` SET `option_value` = replace(`option_value`, 'http://apriori.ml', 'http://assets.max-drake.cc') ;
UPDATE `wordpress814`.`wp_posts` SET `guid` = replace (`guid`, 'http://apriori.ml', 'http://assets.max-drake.cc');
UPDATE `wordpress814`.`wp_posts` SET `post_content` = replace (`post_content`, 'http://apriori.ml', 'http://assets.max-drake.cc');
UPDATE `wordpress814`.`wp_postmeta` SET `meta_value` = REPLACE (`meta_value`, 'http://apriori.ml', 'http://assets.max-drake.cc');
This worked for most of the sites, some I still have issues with and am trying to sort out.
The next thing was that a lot of images did not work as they were pointing at the wrong link, so I ended up following this article that uses a plugin Go Live Update Urls to update the image links, and it definitely worked on my blog site.
Some sites are now reasonably OK and active, others need more work on them. So doing this intermittently.
End Comment
I’ve just purchased a single domain and am using sub-domains for other sites I want up and running.
I’m not as passionate about writing things up on a post nowadays as I’m predominately using Obsidian for writing articles and tracking issues. When using Obsidian I write bullet points rather than trying to make the article clearer for others.
Idid use an add-in that I could use to post articles from Obsidian to WordPress but that had some issues and I stopped doing it.
I have meant to come back to writing articles and showing development code projects on my sites but that’s dropped off rcently as I’ve been focusing on Home Automation and have not got far with it over the last few months so the priority of having my websites up and running has not been as great.
I have found the articles on-line handy as I can send links to people showing the process that I took. Also handy for updating my CV which is online, but as I’m semi-retired now its not as important to keep it current or online.
I’ve also noted that my VPN is running slower and I may need to upgrade, but its more expensive and I’m not sure that there are many benefits for me at this time, and I’ve also considered having a home server.
So a few issues have arisen were I’m not prioritising my on-line presence, bot on the other hand I have a lot of content that will just disappear if I do not maintain it.
So come winter I should put more effort into getting my sites up and running again to a reasonable level.