The Site Has Migrated

The Site Has Migrated

Although it is absurd i decided to migrate the blog from https://www.main-vision.com/richard/blog/ to https://blog.main-vision.com/. It is absurd because the website has been at the same URL since 2004 or so, and to move it is to lose years of hyperlinks. At the same time the updated URL should be preferred by search engines.

The Blog Is In The Fediverse

It is also part of the fediverse now, which means that every post can be followed by people natively on the fediverse, rather tha via RSS, Jetpack and more. In theory this should make the site more visible. It will take a little time for search engines to update their links but when they do things will be back to normal.

WordPress Doesn’t Like To Be In Two Places At Once

Wordpress doesn’t like to be in two places at once, which is why I was forced to ship or get off the pot. I might have modified one word to make it more family friendly. The point is that plugins hate when they find that they are at two URLs. You fix the blog in one place, and the second place will break the place you just fixed. The result is that you’re forced to choose one, or the other. WordPress is fine in being in two or three places, but plugins hate being in limbo.

Discontinuing the Hugo Version

Although I really like playing with Hugo, the static website generator I dislike how slow it is to update a website with so many pages and hyperlinks. Generating the site takes a short amount of time, but updating the website online takes ages, and because of this it has become unsustainable to continue the experiment. When I find a more efficient way of updating just the pages that have changed, on the server, I can revert to playing with Hugo.

ClassicPress and the Fediverse – Not Quite Ready
|

ClassicPress and the Fediverse – Not Quite Ready

Yesterday I experimented with migrating my blog from WordPress to ClassicPress to see whether ClassicPress plays nicely with the fediverse. It does but there is room for improvement.

If you want instructions on how to migrate from wordpress you can find the instructions here. Summarised, you download the switch to ClassicPress plugin, you run it, it checks that you’re ready to migrate, you fix what needs to be fixed, and when ClassicPress sees that you’re ready it will allow you to start the migration. The migration takes a second or two. It felt almost instant in my case. You know it has succeeded because you see the “ClassicPress” message at the bottom of the admin section.

Wanting to Quit WordPress

I want to dump WordPress for two main reasons. The first is that it has become bloated and slow. It offers an enormous amount of functionality, but at the cost of speed, and efficiency. The second reason is that it uses React and I am deeply opposed to anything developed by Facebook. Instead of connecting single people, it reminds single people of their isolation. It gets caught playing with emotions, and facilitating genocide, and never, ever apologises. By using React WordPress is closer to Facebook than I would like.

How Well ClassicPress plays with the Fediverse

If you want to write a blog post, and for it to show up on the fediverse via the Activity Plugin then it’s ready and work well. As soon as you post from ClassicPress it shows up in the fediverse streams. If that’s what you want to do then it works seamlessly.

Comments Unseen

With WordPress if someone comments to a post on the fediverse then it shows up in the wordpress comments section. With ClassicPress the comments are only visible on the fediverse. The quick fix to this, is to write a comment in wordpress that shows up on the fediverse. At this point communication is two way.

Why This Matters

If you’re writing blog posts, and people comment on the fediverse, but you can’t see the comments, then you won’t know to thank, ignore or react. You will be posting into a vacuum with no dialogue taking place. By having two way commenting we have a way of having the blog as an integral part of the fediverse, and vice versa. Now that I know what’s possible I don’t want to go back.

The Side Track

Aside from experimenting with ClassicPress I also noticed that there are plugins that allow you to provide a summary of content headings at the top of the page, as well as a markdown parser or two to choose from. The final one was an estimated reading time. The last one isn’t that intereting, but it’s a curiousity worth knowing about.

And Finally

When I can get the exchange of comments to be from the Fediverse to my blog, and vice versa withput having to comment first I will be happy because then it will be seamless and I will be able to dump WordPress and focus on ClassicPress.

Using WordPress as a Fediverse Instance
|

Using WordPress as a Fediverse Instance

User profile as seen on Mastodon.social


Over a period of a few days I have turned my WordPress blog into a fediverse instance. The process took some trial and error. In the end it was quit easy and there are three steps.


Step One: Have a WordPress Instance


The first step is to have a WordPress blog/CMS. You can start with an existing website, that you are willing to have on the fediverse, or you can install the WordPress CMS in another director and use that as a dedicated Fediverse CMS.


Step Two


Go the the plugins tab and add the activityPub plugin. Once this is done your blog will work as a fediverse instance. When someone subscribes to your instance via Calckey they will be able to read entire blog posts within Calckey, as if the blog was written natively. They can also comment but this is one way. You will need to check for comments and replies manually.


Step Three


The third step is to install the webfinger plugin for wordpress. This was the most complicated challenge for me, because webfinger expects to find the .well-known directory in the root of the website rather than the directory where the blog may actually be.


If your blog is in the root then you’re fine, your WordPress blog is now a Fediverse instance.


If you’re like me, and webfinger points to the wrong place then I have a simple solution.


Go to the webfinger lookup url and type your username. It will show you a get https line with where it expects to find your json file. Copy this into the URL bar but type the correct path. You will know you wrote it correctly when you get some JSON data. Copy this data and paste it into a file called webfinger.json.


Create a .well-known directory in the web rooot folder of your site. Add the webfinger.json file to this directory. Go back to the webfinger lookup page and check that your username@domain works correctly. If it returns the right json you’re in. Your blog is now a Fediverse instance


The Complicated Alternative


The advice I give for step three is the advice I would have liked to receive. People suggested that I change the htaccess file, which I tried to do, but without success. If you do attempt to change the htaccess file keep an unmodified backup in case you break something. I wouldn’t recommend experimenting with the htaccess file. The webfinger.json solution is simple and intuitive.


Why Does This Matter


The pre-requisites for installing Mastodon instances require permissions that we might not have on the host we are currently using. This limits what we are able to do. By having WordPress and the ActivityPub plugin and Webfinger we are able to bypass several barriers and get a fediverse instance running within minutes and in theory anyone can do it. Anyone that is familiar with WordPress.


And Finally


On Mastodon blog posts are shown as links to articles. People still have to visit the blog. If and when people comment on the mastodon toot those comments are added to the blog post comments, and vice versa.


With Calckey the blog posts that you write in WordPress display natively in Calckey. It does remove formatting however, so that’s something to work on. People that comment on the calckey post will be visible in the blog posts and vice versa. It’s native integration. It works well.


Now, when we write blog posts, people can see them directly in the fediverse, without having to browse away, especially with Calckey integration. In theory your blog post is not a blog post. It’s a note. This seamless integration should bring new life into blog posts. What I find especially amusing is that my blog already has 2100+ posts, in theory. In practice it has many more. People do not see legacy posts. They only see posts from the moment they start following on Mastodon or Calckey.

Transitioning from WordPress to Hugo

Transitioning from WordPress to Hugo

Transitioning from WordPress to Hugo is tempting because I don’t need an entire CMS for what I’m doing. What I need is a centralised system that checks for tags, titles and the theme, and updates the navigation as I add new pages. You don’t need a CMS for that.


The Good Old Days


If you go through the meta data for many of my static pages you will see that they were created with dreamweaver, frontpage 2000 and other solutions. The aim of these was to create an application that would prepare the html and navigation for pages, so we could concentrate on content creation. This was before the age of the CMS.


A short Learning Curve


If you want to create a simple blog, without changing much the learning curve for WordPress and Hugo is short, compared to what is required for Laravel, Angular and other solutions. You create content and there are tools that will take care of almost everything else.


With Hugo and WordPress you can, theoretically, start creating content and sharing it within minutes, or even seconds, depending on how many times you have set things up before.


HTML or Markdown


With Hugo if you want to create a simple page you can use markdown and save a lot of time and effort. You focus on headings, images, lists and hyperlinks. If you want to have more flexibility you can generate an HTML page, and with this you can do anything you want, and have the experience, to do.


  • hugo new blogs/big-timber.html


  • hugo new posts/hugo-and-wordpress.md


A Huge Mess


I need to find a solution to a problem. I have a blog with thousands of articles so I have thousands of markdown pages in a single directory. I considered using the creation date with year-m-d-article-title.md but if I do this then Hugo will use that as the headline for new blog posts. I would need to edit the Title of new posts, to remove the date information. For the public folder, once the blog is exported the files are tidy.


Thousands of Files and Directories


Hugo likes to create a folder and file for every single page. The result is that every page has its own folder. That’s fine, when everything is working well, but chaotic every time you make changes. At the moment of writing every change generates 6000 files and folders. That’s 10-20 seconds per export, and this doesn’t include the upload time.


Minor Changes With A Big Cost


When you’re using a CMS like wordpress changing a theme takes seconds. You find a theme, apply it, and a few seconds later you’re ready to role. With Hugo if you change the theme you need to regenerate and then reupload the website in its entirety. Small changes become big changes. Having said this, with a static website, managed by hand, rather than Hugo, this would take hours, rather than seconds.


Very Fast, Flexible


I see that Hugo is fast and flexible. It provides the organisational features of a CMS with the flexibility of HTML pages, when that is desired. This makes it easy to circumvent the limitations that are imposed by markdown, for those that want to embed videos or other features into a specific web page or blog post.


And Finally


Hugo requires no back end. Anywhere that you can upload html, can display a Hugo website, or individual pages. You have the ability to tell Hugo where the files will be on a server, so that links are built to play nicely. Both the static part of my website, and the blog may soon run via Hugo.

A Desire to Dump WordPress

A Desire to Dump WordPress

In theory WordPress is a fantastic tool to write a blog, without needing to learn to code. In practice I am tired of WordPress and I have been tired of WordPress ever since they started to use blocks, and ever since I noticed that it uses React. 


React and Meta


I know that PHP was developed by Facebook, and that we use it all the time, but I also know that React was developed by Facebook as it was morphing into Meta, the destroyer of the independent web. Instagram and Whatsapp were destroyed by Facebook, as the monopolist took over those accounts. 


Blocks and ClassicPress


I am not alone to feel this way. I see that there is the ClassicPress community. I tried ClassicPress and it works, but it feels like time could be better spent with a different project, that diverges, and has a more concrete direction than “We don’t like blocks”. I am oversimplifying. I realise it’s more than that. 


Hugo


After playing with Hugo for a week or two I think that this would be a very nice solution. I don’t need comments, and I don’t need a complicated backend for the type of blogging I do. I believe that Hugo would easily fill the gap left behind by WordPress. 


Dormant WordPress


If and when I do make this change I won’t convert my WordPress blog to Hugo. I would simply create a new directory and write blog posts that would go there. I am still not certain of my strategy. For now the goal is to have my static website running Hugo cleanly, before then adding the blogging section. Within the next week I should be ready to make the leap. 


And Finally


Before WordPress I tried plenty of different content management tools and services, as can be seen in the wayback machine.  I am migrating, primarily because I want to try something new. I want to learn how to use a new tool and expand my skills, rather than have them plateau. The reason for the switch can be described in a single word. Curiousity. I am curious to see how I can use this “new” tool, to blog, with a different workflow. 

Of Blogging and Substacking

Of Blogging and Substacking

A month or two ago we had the chance to jump on the Substack wagon while it was hot and to ride the wave of new followers and experience a growing community. I could have joined in. I could have become one of those “I’m one of you people” but I didn’t. 


Substack Life


Substack went from being a newsletter to almost becoming a community of writers. I say “almost”, because for me to consider a community a community it has to behave like a community. It has to be a network of friends of friends, and it has to be about individuals connecting with other individuals, through their community. 


With Substack it went from “Wow, notes look great” to “My follower numbers have exploded”, “oh so have mine”, and that’s when I disengaged. People behaved the same way on Twitter and the community was degraded into a network of strangers following each other and fighting for attention. Within the space of hours the network that it could have become was degraded to a popularity contest. I have no interest in these. If I wanted to join one I could socialise in the physical world of bars and other places. 


What I don’t like about Substack, and social media in general, is that it’s about users creating content for the owners of the social network, and then making money off of our backs, without giving us anything in exchange. Twitter, Facebook, Instagram, WhatsApp and other networks have all made this move. 


On Blogging


With tools like WordPress, among many others we have the freedom to generate content, and choose whether to pay for our own hosting, and manage our own websites and attempt to monetise them, or jump onto Wordpress.com and other solutions. and just create content for the pleasure of it. 


I mention pleasure, because with blogs we write because we have inspiration. Either we have done something that we want to share, or we have an opinion on something, that we want to get out of our minds, by putting it on screen, and then forgetting about it. 


I prefer to blog because although it could be e-mailed to someone it is usually just one post, in a timeline, among many others. People can look at it, think “this is dull and boring” and move on. With blogs there is no obligation to read any post. It’s all about whims. 


With Substack the opposite is true. You write a post, you e-mail it, and people have to swipe to it, keep it on screen until it’s marked as read, before moving on. 


I like e-mail for private conversations, but feel that newsletters et al would be better served by being blog posts that we can opt in to reading. or skip and ignore. 


And Finally


I prefer blogging to Substack Newsletter writing for two reasons. The first is that I want to write about anything, rather than on a specific theme. The second reason is that I don’t want to generate content that someone else will benefit from, more than I will. I don’t want to be used and exploited. With blogs I do not feel that way. With Substack I do., I went from being a person to a statistic within hours of Substack Notes being created. 

I Want to Dump WordPress for Laravel
|

I Want to Dump WordPress for Laravel

For at least a year I have been annoyed with WordPress, not because it went from the classic editor to Guthenburg but because it now uses React and I hate the idea of using React because it was a FaceBook project. I don’t trust Facebook and I don’t want to use anything related to them.


I don’t want to use FaceBook because it reminds me of the life I don’t have, Instagram because it switched from being a network of friends to a network of spam, WhatsApp because it’s owned and controlled by FaceBook so privacy is at risk, and finally React because it is part of the FaceBook universe.


I was tempted by the Occulus Quest a few years ago but I didn’t buy it, because it would ingest me into the world of Facebook. If Facebook, now Meta, was caught being unethical and immoral, and said sorry, and did something to fix the situation, then I would rethink how I feel about the company. The reality is that when they’re caught being immoral they just wait until we forget about it. That’s not how a social network should be, especially one that experimented with making us feel negative, and was caught helping with spreading disinformation to the right people to get Brexit to succeed, and Trump to be elected.


But What About PHP?


I know that some of you will ask “But if you refuse to use React, why don’t you feel the same way about PHP? PHP was developed in part by Facebook years ago, but it came of age when I didn’t have a negative opinion of Facebook yet. I don’t want to use React because I don’t want to make it easier for Facebook to have a monopoly on the World Wide Web.


I also feel happier learning to use technology where I am not competing with everyone else. I still studied Vanilla JavaScript via several courses and understand how most functionality works, even if I can’t write the code from scratch without help.


Back in 2004 and earlier I was playing with every framework I could find, installing it, seeing what I could do, and then moving on. I found WordPress and my learning reached a plateau. During the pandemic I started to study how CSS and other technologies worked until I found that PHP and Laravel feel intuitive compared to other technologies. I wanted to use Angular but I got stuck, so I learned Vanilla JavasScript, then Python, and then PHP, and finally laravel. With PHP and Laravel I got things to work without struggling.


I did get stuck with Laravel, with permissions, which is why I studied “Let’s Learn Laravel: A Guided Path for Beginners. I am at section 15, “Deploying To A VPS”. After that the course will be done. I still want to follow courses on how to make Laravel secure. My goal is to make my website a showcase of my understanding of Laravel.


And Finally


Although replacing WordPress with Laravel would be a fun goal to achieve I think that the first step is to turn the static part of my website into a dynamic one. Once that is achieved then I can see whether I want to migrate my WordPress blog to Laravel, or keep things as they are. Security wise it makes sense to stick with WordPress, until I know more.

Switching From MySQL to MariaDB with Infomaniak
|

Switching From MySQL to MariaDB with Infomaniak

Today I tried Switching from MySQL to MariaDB with Infomaniak as a webhost. This morning they sent an e-mail to say that we could switch from MySQL to MariaDB automatically so I tried. For the test I:


  • downloaded a new install of wordpress to my local machine and put it in the MAMP htdocs folder under mariadb.
  • I installed MariaDB on port 3310.
  • Using the command line I created a wordpress database.
  • I configured WordPress. Within seconds the website was up and running.
  • When I saw that the interface was that the same and that I had to make no changes I went ahead with Infomaniak.
  • Of course I backed up the MySQL server data, just in case.


Within a matter of minutes of telling Infomaniak to switch from MySQL to MariaDB the migration was finished and the website was up and running again. It was quick and painless. If something did go wrong I could easily step back but I also ensured that the user interface for MariaDB and MySQL were the same. When you’re coding websites from scratch some databases require different lines of code to function. That was my concern, and that’s why I decided to experiment with a small scale trial on my own machine.


How to create a database and tables in MariaDB


To learn about the differences between MariaDB and MySQL.


The plugin I modified for my own use, works on one of my local wordpress installs so I could port it to the website. I still want to experiment with having custom css for those pages without pasting the code as custom html. Custom HTML in WordPress is messy to deal with. I prefer to find a clean solution.

With A view of the Mont Blanc
|

With A view of the Mont Blanc

I’m afraid to open the veluxes because of the threat of finding yet another large spider. I don’t mind having to dispose of it, but I hate the idea of having one walking around without me knowing. A great alternative to open windows is to go for your daily walk. You’re far from neighbours, from smokers, from metalworking and more. You are free to daydream. Today the Mont Blanc was clearly visible. The image is at max zoom with an iphone 8+.


A view of the Mont Blanc, as seen from Vaud


Yesterday and today the harvesters are out collecting corn and sunflowers. I captured a harvester as it dumped sunflower seeds into a trailer before moving on to finish the field. It is a shame to miss it at work.


A combine harvester unloading Sunflower seeds
A combine harvester unloading Sunflower seeds


What I Am In The Process Of Learning


Today I got a step closer to being able to control WordPress more proficiently than I can at the moment. With hierarchies related to taxonomies via specialist post creation. Coding your own post types and your own taxonomies gives you enormous control over what you can do with WordPress. I have projects. I know how I want to use this newly acquired knowledge.


This website will be overhauled. The static part will be moved into the CMS, and the CMS will behave, as the old website did, but with ease of new post creation and more. The challenge is in updating to new technologies, and using this process as a learning and consolidation phase, as I did with CSS and other technologies over the years and decades.



I don’t feel comfortable writing about my trials and tribulations on Linkedin because it feels as though you need to be at your peak, rather than as a between achievements point. With the blog, I can document the learning curve, and the progress I make as I work towards acquiring new skills, in my efforts to build a different career path than the things I have done so far. I also have a project to work on in my free time, aside from the website. The second project is ambitious, and useful. You will learn more, as I get ready to reveal more.


Playing with WP Rig

Playing with WP Rig

Today I started following the “Building Progressive Themes with WP Rig.” course on Linkedin Learning.


Before you start playing with WP Rig make sure that you have installed Composer. Composer is required to use WP Rig during the build process. Composer itself requires that you have PHP on your machine. After that it should be easier to use. I also ran npm-install-peers because I kept getting error messages.


During the daily walk today I saw that the grass along the side of the road is dry and dead. It crunshes as you walk on it. As you look at other fields they are dry and probably crunchy too. We had some rain a few days ago, but within minutes of the rain stopping the landscape was dry again. We never get rain. I am impatient for a day of rain. I am impatient to look forward to good weather, rather than bad. It seems to be absurd to want rain in Switzerland. In winter skiers and snowboarders want snow.


I managed a 179 day reading streak with the kindle before I broke it. It wasn’t that I didn’t read, but that I didn’t read using the kindle. It’s frustrating to lose such a streak because it will take 179 days to get back to the same point. It makes no sense to reach for such a goal in the first place. These apps that get you to do things for an unlimited days in a row detract from the pleasure of doing certain things habitually. I have read a book every day for many months, probably years, but I use Audible, Kobo, physical books and the Kindle. I need to find an app to track reading streaks without it being locked in to one book store.