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 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 plugin. 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.

Leave a Reply

Your email address will not be published. Required fields are marked *