Coming to grips with Rank Math

Rank Math

In a previous post I mentioned Yoast and that I had it working. Well I sort of did but I found it to be not really to my liking. Whilst idly reading posts in a Google Analytics Facebook group I stumbled a post about the Rank Math SEO plugin so I thought I’d do a bit more reading and see what the go is. I liked what I saw so I went ahead and got rid of Yoast and downloaded and installed the Rank Math plugin. It seemed a lot easier and less cryptic to me so I decided to go for broke with it. Configuring it was a breeze and soon I had it telling me what I should do to this site to enhance my search results.

I still had one problem though. Sitemaps. The I read something on the Rank Math web site about Googles new Indexing API and of course I just had to try it out didn’t I. Goodbye sitemap issues.

I just followed the Rank Math instructions and it all worked OK apart from a couple of user errors that were easily fixed by re-reading the documentation and carefully following it.

Since installing the Rank Math and the Instant Indexing plugins a few hours ago I’ve already had this site indexed and there are results already apparent in the google search results. Now I have to go through all my posts and pages and follow the advice that’s in the Rank Math documentation regarding improving the sites SEO. This’ll keep me occupied for a while. With the COVID-19 lock down still in force time is something I have an excess of so I may as well make use of some of it playing around here.

More WordPress wrangling

The start of it all

When I started this whole LAMP + WordPress thing I just leapt straight in. I had the content under jandmf.com/blog which meant that I needed to have a redirect in my .htaccess. I also skipped SSL – I was impatient and just wanted the thing up and running. I already had a strategy to move the content from where it was and I already had WordPress sorted out – to a degree.

Anyway I got the web site up and running well but without SSL. It transpires that search engines really, really like to see SSL and without it your search engine results can suffer. Because I’m using Google AdSense  to place advertisements I wanted good search engine results.

So now I had three tasks. Install SSL, move the content from “jandmf.com/blog” to “jandmf.com/” and to find a decent Search Engine Optimisation plugin for WordPress.

Getting SSL happening

Getting SSL happening was the task I chose to do first. How hard can it be ? There’s a heap of HOWTO’s online. Some of them are really cryptic and others are long winded but straight forward. Then I found Certbot. I just followed the instructions and it installed perfectly. Only problem is that Jenny’s site worked perfectly worked perfectly but the WordPress part didn’t. I ended up messing around with my WordPress configuration a lot in an effort to get it working. On more than one occasion I needed to restore my backup to get it working again. This palava went on for a couple weeks until I moved the WordPress site to where it should be. Once I moved the WordPress part of the site  to “jandmf.com/” it all fell together. There were a few references to “http://” in the site and database but it just so happens there is a handy search and replace pluging. This was duly downloaded and installed and run. The configuration needed a bit of tweaking too but after a bit of messing around it all now works perfectly.

There may be a few stray references to “http:/” in the site but I’ll stumble across them sooner or later and fix them. Embedded Google Maps is a bit of a problem as they all start with “http://” but I’ll fix them as I go. There’s only about five or six of them so that’s an easy job.

Moving WordPress

The next effort , in conjunction with SSL, was to move WordPress from “jandmf.com/blog” to “jandmf.com”. The thought of doing this filled me with all sorts of trepidation.

After trying to work out some sort of scheme I decided to backup the site as it was and then simply move the contents of “/var/www/html/blog/” to “/var/www/html”. The process was easy and it only took about a quarter of an hour. Imagine my surprise when it just worked. There were a few references to the old location but the search and replace plugin that I used for SSL came into play again – just change “https://jandmf.com/blog/” to “https:jandmf.com/”. It seemed too easy but it was a complete success.

So, two out of the three steps accomplished in an afternoon. SSL installed and working and the actual web site files in a more sensible place.

Onwards to step three. Search Engine Optimisation.

Yoast SEO is now working

SEO is something I know very little about. Google and the like are big mysteries to me.

I’ve read a heap about SEO but I still don’t understand the way Google actually works. After reading docs from WordPress and Google I went with the flow and installed Yoast. People seem to swear by it and there seems to be a pretty good user community.

The reason for SEO is that I’ve also got AdSense or Google Ads in a sort of vague effort to make a bit of money from this site. That means I need a lot more visitors who can the click on the ads which sends a minuscule bit of cash my way. The way to get more visitors is shameless promotion and Search Engine Optimisation which means a SEO plugin. Yoast is the one I chose so we’ll see how it goes.

Installing and configuring was really no different to any plugin and went without a hitch. I don’t expect miracle’s  but we’ll see how we go.

Wrestling with Google AdSense

Oh boy this was a struggle.

I figured that if I was going to make any money at all from the site it would be through advertising. After having a look around, and readging what others have had to say, I went with AdSense.

Getting the advertisements displayed on the site was really easy. Just follow the instructions on the AdSense site and you’ll have advertisements showing up in no time.

Of course there’s always a problem. This time it was the placement of the adverts. Google seemed to place them all over the place. All I wanted, but seemed unable to get, was an advert at the top of the page and another at the bottom of the sidebar. Too much to ask I hear.

Enter the Advanced Ads WordPress plugin. This made life a lot easier – especially now that I understand a bit more about how it works. I still couldn’t get what I wanted but I was getting closer. The I read something in the Advanced Ads documentation about child themes. I did a lot more reading and found out that with a child theme I could just have the two adverts where I wanted them.

As you can see I now have an ad at the bottom of the right hand sidebar and at the top of every page. The ad at the top is too high for my liking because I haven’t quite worked out to halve its height. I’m still testing the child theme on another test site and when I get it working right I’ll incorporate it into this one.

The final word

Well now that I’ve just about finished messing around with the site infrastructure I’ll be able to put up some more actual content.

Jenny and I have started planning a big trip of about six months and I’ve started a series of posts about that. Stand by for further news on that front.

Taming WordPress

Installation and testing

This is the easy bit. There are any number of good web sites that describe how to get Apache2 installed and running as well as MariaDB and PHP. With the benefit of hindsight I’d also get SSL happening as well but I didn’t and now I’m faced with the prospect of retrofitting it which is something I can’t be bothered with right now.

The sites that you want to make use of are php and apache2 for getting apache and php up and running. The simplest way to get good documentation and HOWTO’s for getting things installed and running is to just google search for eg. “raspberry pi apache” and “raspberry pi php”

Installing WordPress is as simple as downloading the latest version from WordPress and unzipping it to the folder (directory) of choise. Usually /var/www/html on a Pi.

As ever with this sort of endeavour just remember “google is your friend”…

Configuring WordPress

Before you start adding any content to WordPress get it configured. Get your database name and stuff sorted. Get your WordPress folders sorted. Don’t be tempted to start downloading themes and plugins. Just get the basic configuring done.

If you, like me, manage to wreck everything you can always go back to a freshly created SD card and start from scratch without losing anything apart from some time that can be written off as a learning experience.

The WordPress web site is chock full of useful informtion and documentation. They spent a lot of time writing it so it behoves me to spend a lot of time reading it.

Getting it all togther

By now you should have WordPress up and running and configured and it’s time to start adding a bit of content, right ?

Wrong. Now that you’ve got it all working it’s time to take a backup. Right now. It may save you a heap of time in the future.

The Raspbian Buster installation provides a handy SD card cloning tool. Using another SD card and a handy SD card adapter or a multi card reader use the cloning tool and when it’s finished test the card by booting you Pi from it. You will have two identical cards if it all went well.

Now it’s time to starting adding a bit of content.

Adding content.

This where the fun really starts.

The first thing to is to pick a theme. Any theme. This site is based on the 2016 theme and is one of the themes in the distribution of WordPress. It’s pretty simple and easily customisable.

There are few plugins that will help with adding content too. I have a few that I wouldn’t be without.

  • Back Button Widget
  • Contact Form 7
  • Display Posts
  • Email Subscribers & Newsletters
  • Page Builder by SiteOrigin This one is a must have. It makes building pages dead easy.
  • SiteOrigin Widgets Bundle Also a must have.
  • Page-list
  • Updraft a must have to backup your site.

Other plugins that I use to make life a bit easier are :-

  • WP Sitemap Page
  • WP Social Sharing
  • WP Statistics.

One thing I’ll say about plugins and themes is get rid of them if you aren’t going to use them. If you have a change of heart they are easily downloaded and installed again.

Now to actually adding content. For starters I used any old photos and documents. I played around with tags and categories until I got a handle on how they work. If you use an iPhone get BIRU-WP as it’s a very handy tool for resizing and uploading photos directly from your phone.

Once you have your theme and plugins knocked into shape you can get rid of your test content and start on the real stuff.

The BIG thing to remember is to get rid of the themes and plugins that you don’t use otherwise you’ll end up in some sort of plugin and theme hell.

 

The end

From the outset this isn’t to be considered a complete step by step HOWTO but rather a bit of a guide as to the order to do things. I would recommend that at the end of every major step you clone your SD card so that you have a known good point to go back to when you screw it all up.

After I got LAMP and WordPress configured and working properly I moved the “/” partition off to an SSD and I make use of the SD cloning utility and RSYNC on a regular basis because I really don’t want to lose what I’ve created.