Fresh Start

I should have known better – I’ve built wordpress sites before, but usually they’ve popped up pretty smoothly. FTP some files up here, edit a config file there, give it a mySQL database to write to, and hey presto.

This time was different. I uploaded the files OK and wrote the new config file for the new database server I have.

‘Syntax Error in line XX in config.php’ it kept telling me. Well, the file looks OK and the line wasn’t incorrect.

I updated a setting, uploaded the file again. No – still no joy. Same error.

I thought I’d build the site with the latest version of PHP and the latest version of MySQL. So I downgraded the back end from PHP7 to PHP 5.6. Nope not that. Ok, switch it back. What next.

Humph. Do I need to create a .htaccess? I open Textedit and create it. Upload to platform. Even more errors. I regress, give in, and drop back to using the command line and the vi editor, because thankfully a mac, for all it’s amazingly shiny GUI, is actually a proper UNIX box underneath

(yes, not even Linux – but a proper UNIX BSD derivative forked from Steve Job’s original NeXTSTEP OS).

Vi is your friend here. I open the .htaccess file.

Oh damn, it’s full of XML. I didn’t put that in there. Remove all gubbins from file. Back to old error.

Well, that doesn’t work. Although to get the file to create I had to use a command line as you can’t obviously un-hide files on a mac. Must be for your own safety, to stop you from doing something you may actually want to do in the GUI. Although in the command line, ls -al gives me what I need. I remove the .htaccess file and scratch my head, and swear.

Michelle shouts from the kitchen ‘are you swearing at me?’. No – I’m swearing at my inanimate silicon friend in the corner which isn’t working how I expect.

Grr. So what is it. I decide to Vi the config.php file.

Ok. It seems obvious now, but who knew that ‘ and ` are two different things? It was pretty clear in the Vi editor, but for some reason, the Mac OS textedit GUI decides that ` looks nicer than ‘ and replaces it – even though I’m typing ‘.

So I go through the document, and replace all the instances of ` with ‘ and guess what – well, it must have worked because I’m typing this and you’re reading it potentially.

Anyway – I may sporadically put stuff up here as and when I think of it. 🙂

Leave a Reply

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