WordPress backups with UpdraftPlus

A meme featuring Anakin and Padme from the Star Wars films. Anakin is saying 'I've reinstated my WordPress install after everything got wiped' and Padme says 'so you've got backups now right?'

It’s a little while until World Backup Day on the 31st March, but I’ve set up UpdraftPlus to create automatic backups of my WordPress installation to my Dropbox account.

It’s a straightforward plugin to set up. You install it from the WordPress plugin directory, select your cloud storage provider, choose what you want to backup, and then run it. If it all goes well, you can then set a schedule for automated backups.

The free version offers Dropbox, Google Drive, Amazon S3 and some others, and you can also upload your backups to any FTP server, albeit over a non-secure connection. If you want to use WebDAV, SFTP, SCP, Microsoft OneDrive or UpdraftPlus’ own service, then you’ll need a premium account. At present, it’s £54 per year for up to two personal sites, which is pretty reasonable – the equivalent of a little over £4 per month.

Your backups can include everything if you want, but I’ve excluded plugins and themes from my backups. I haven’t modified the theme that I am using, and I’m not using any custom plugins – everything is from the WordPress plugin directory.

Backing up my files to Dropbox makes the most sense to me. I pay for Dropbox Pro and so have 2 terabytes of storage, of which I’m using less than 7%. Whilst VaultPress is the officially-supported solution for backups for WordPress, it’s not a free service and I’m already paying for Dropbox Pro.

The best time to set up backups is now

There isn’t a ‘best time’ to set up backups for any system apart from, well, now. So, if you haven’t got a backup solution in place, this is your reminder to sort something out. I lost all my blog posts in 2018 because I didn’t have adequate backups in place when doing a server upgrade. I would say I learned my lesson, but I’ve been blogging again for 18 months now and only set up UpdraftPlus last week.

There are many other WordPress plugins that offer backups – some free and some paid. I chose UpdraftPlus as it seemed to be the one which offered the features that I wanted, but you may find another suits you better. Just make sure that you have something in place.

The Birthday Gift of Blogging

An AI-generated image of a blog post popping out of a gift box whilst a crowd of people look on in awe

You may have heard of Matt Mullenweg – he co-founded WordPress, and is now the CEO of Automattic, which owns WordPress.com and contributes to WordPress.org (the downloadable version that you install on your own server, like I do).

Matt, like me, is turning 40 this year. And, as a ‘birthday gift’, he has asked people to blog. About anything.

Having only recently returned to blogging regularly, I’m starting to enjoy it again. With the rise of the Fediverse, the web is starting to feel like it did again in blogging’s heyday in the mid-2000s. Whilst some people used centralised sites like Blogger and TypePad back then, you could use tools like WordPress and Movable Type to run your own blog on your own server, and still interact with everyone else. And then the closed gardens of Twitter, Facebook, Instagram and the like came along, and you had to be on those platforms to interact with other users.

Anil Dash has written a piece for Rolling Stone magazine called ‘The Internet is About to Get Weird Again’. And I think he’s right; there’s growing dissatisfaction with these big centralised services and how they hoover up so much personal data to sell to advertisers. Meta’s Threads is dipping its toes into the Fediverse, which would mean that Threads and Mastodon users can follow and interact with each other in a way that hasn’t been possible before. And if it works for Threads, could we see Instagram joining the Fediverse, to connect with PixelFed and maybe even Flickr?

Anil has some further reflections on his own blog. I’m hesitant to say that ‘blogging is back’; after all, there are so many other places that we can share short thoughts where there are audiences. But I feel like it’s having a bit of a renaissance, and in an age where there’s so much AI generated waffle filling up our search engine results, being able to interact with other humans has never been more important. It was what the web was designed for, after all.

So, happy birthday to Matt – and here is your gift from me. I hope that many others will do the same.

A WordPress plugin update fix

An AI generated image of a man holding a giant plug, looking at his watch

For a little while now, I’ve had some issues with installing and updating plugins in WordPress. Trying to do either of these tasks has resulted in the process hanging for a long time, and then eventually failing. As a side effect, the Site Health screen would never load – it was just sit there for minutes at a time, but never timing out. Which was frustrating, as I was hoping that Site Health would give me some clues as to why my site wasn’t, well, healthy.

Eventually, I dug into my wp-config.php file. I’ve edited mine a bit, to add some FTP credentials and define the home page and site URL. This offers a marginal performance improvement as it reduces the number of database calls your site needs to make. With my FTP credentials was this line:

define('FS_METHOD', 'ftpext');

It turns out that I probably shouldn’t have that line there. I commented it out, as below:

/* define('FS_METHOD', 'ftpext'); */

And suddenly everything worked again. Huzzah!

According to the documentation, you probably don’t need to have this in your wp-config.php file and removing it can solve problems. Having it there forces WordPress to use a particular method for interacting with your host’s file system, but by default WordPress should choose the correct method automatically.

I’m guessing it was in there after I copied and pasted some code from somewhere else, without knowing what it did. Which is a reminder that just copying someone else’s code without understanding it is not a good idea.

Comment Spam strikes back

An illustration of a robot turning web pages into canned meat product. Generated using Bing AI Image Generator

So now that I’m blogging again, it’s the return of comment spam on my blog posts.

Comment spam has always been a problem with blogs – ever since blogs first allowed comments, spam has followed. Despite the advert of the rel=”nofollow” link attribute, automated bots still crawl web sites and submit comments with links in the hope that this will boost the rankings in search engines.

In the early days of blogging, blogs often appeared high in Google’s search engine results – by their very nature, they featured lots of links, were updated frequently, and the blogging tools of the time often produced simple HTML which was easily parsed by crawlers. So it was only natural that those wanting to manipulate search engine rankings would try to take advantage of this.

I’ve always used Akismet for spam protection, even before I switched to WordPress, and it does a pretty good job. Even then, I currently have all comments set to be manually approved by me, and last week a few got through Akismet that I had to manually junk.

Humans, or AI?

These five interested me because they were more than just the usual generic platitudes about this being a ‘great post’ and ‘taught me so much about this topic’. They were all questions about the topic of the blog post in question, with unique names. However, as they all came through together, and had the same link in them, it was clear that they were spam – advertising a university in Indonesia, as it happens.

Had it not been for the prominent spam link and the fact they all came in together, I may have not picked up on them being spam. Either they were actually written by a human, or someone is harnessing an AI to write comment spam posts now. If it’s the latter, then I wonder how much that’s costing. As many will know already, AI requires a huge amount of processing power and whilst some services are offering free and low cost tools, I can’t see this lasting much longer as the costs add up. But it could also just be someone being paid using services like Amazon Mechanical Turk, even though such tasks are almost certainly against their terms of service.

I think I’m a little frustrated that comment spam is still a problem even after a few years’ break from blogging. But then email spam is a problem that we still haven’t got a fix for, despite tools like SPF, DKIM and DMARC. I’m guessing people still do it because, in some small way, it does work?

New theme, who dis?

Screenshots of the old and new themes for the blog, side by side

I’ve deployed a new theme on the blog. If you’re reading this in your feed reader, firstly, go you, because so few people do nowadays, but also, please click through and have a look.

The theme I’m using is GeneratePress, with mostly default settings. This replaces one of the default WordPress themes that I was using before.

Why the change? Mainly page bloat; whilst the default WordPress themes are very extensible, the output code includes shedloads of extra JavaScript, CSS and style tags which result in web pages which are bigger than they should be. Whilst I’m at no risk of exceeding the data transfer limits offered by my hosting company, it does affect the speed of the site, and not everyone has unlimited mobile data or a fast connection.

I learnt HTML at a time when it was the done thing to hand-code pages – indeed, back when I used Blogger and later Movable Type as my blogging tools, for the most part I used themes that I had written all myself. JavaScript was used very sparingly, and the HTML and CSS code was nice, clean and simple. So seeing the code soup that was being outputted by the default themes was off-putting.

I also think about this blog post by Terence Eden, ‘the unreasonable effectiveness of simple HTML‘, where he gives an example of someone applying for housing benefit on a PlayStation Portable (PSP). This is presumably because it’s the only portable device with a web browser that she can use. But because the HTML on gov.uk is so clean and lightweight, the old, under-powered web browser on the PSP is still able to render it, and she’s able to get the information that she needs. A big, flashy web site oozing with various JavaScript frameworks, loads of tracking scripts and adverts everywhere just isn’t going to work on such an old device.

And then I saw this toot today:

I can't help but notice the new Apple laptops rate "Video Playback 22 hours, Web Browsing 15 hours" under battery life.

Congratulations web developers everywhere, it's now more computationally intense to render a webpage than video playback!

— Brad L. :verified: (@reyjrar)2023-11-05T04:41:28.299Z

Web pages are getting so full of cruft, that they require more processing power than video playback.

So, that’s why I’m going with a lightweight theme. It makes the web site much more accessible to more people. GeneratePress seems to output lighter code that displays fast, and it offers a good balance between extensibility and speed. It won’t be for everyone, but it seems to work well for me.

The times, they are upgrading

An AI generated image of a superhero emerging from a server cabinet, generated using Microsoft's Bing AI Image Creator

Hello – if you can read this, then the server upgrade worked!

I’ve wiped the previous server image (yes, I remembered to do more than one type of backup this time), and installed a freshly upgraded version of Linux. This means it’s running on Debian 12 (codenamed ‘bookworm’), and version 12 of Sympl. Sympl is a set of tools for Debian that makes managing a web server remotely a little easier, and is forked from Symbiosis which was originally developed by my hosting company Bytemark.

Going nuclear and starting from a fresh installation was for two reasons:

  1. The next version of WordPress, which will be 6.4, will have a minimum recommended PHP version of 8.1. This server was running version PHP 7.3, and whilst I’m sure future versions would work up to a point, it’s a good opportunity to upgrade.
  2. I’ve had a few issues with the previous installation. The FTP server software never seemed to work correctly, and the database (MariaDB) would lock up almost every time I posted a new blog post. Hopefully, this won’t happen anymore.

As this is a fresh WordPress installation, there may be a few things which don’t quite work yet. I’ve imported the existing blog posts and pages, and the theme is mostly the same, but I need to re-install the plugins and probably need to amend some settings. I’ll sort these issues out over the next few days.

WordPress in the Fediverse

A screenshot of the settings page for the ActivityPub plugin for WordPress

If I’ve set up everything correctly, then you should be able to subscribe to this blog in your favourite Fediverse app, such as Mastodon, by following @nrturner@neilturner.me.uk .

You’ll need to install the ActivityPub plugin, and then it should just work where your fediverse username is @your-wordpress-username@your-domain.tld. If you’ve used a plugin to disable author archives, such as Yoast’s SEO plugin, you’ll need to re-enable it for this to work.

I found this guide particularly useful, as it links to Webfinger to test that you’ve set it up correctly.

(Update: since this post was written almost 12 months ago, the ActivityPub plugin has been formally adopted by Automattic and so enjoys wider support)

What’s this? A blog post?

Well, hello. This is my first blog post in almost four years.

I last wrote a post on here in September 2018, and then took an un-planned break from blogging. This was exacerbated at the end of 2018, when I attempted to upgrade the server that this web site runs on, and ended up wiping everything. And I mean, everything, including the backups that I thought I’d saved elsewhere but hadn’t.

Just like that, 16 and a half years of blog posts were gone, along with all the comments. Now, it’s possible that I could have re-built most of the blog posts, using things like the Web Archive and help from others, but between working full-time and being a parent, I just didn’t have the time or the inclination to do so.

Furthermore, I was beginning to become uncomfortable with how much I had shared about my life over the years. Back when I started the blog, aged 17, I had a tendency to over-share. Over time I reigned that in; I was in a relationship with someone between 2005 and 2009 where I agreed not to share her real name on here, and though we’ve both moved on I’m keeping that commitment – not least because we’re still in touch and actually met up recently.

But I also wanted to reign in how much I talk about my child, who is now six. I’m happy to share their age, but I’m afraid you won’t be knowing their name or seeing recent photos, and I’m even keeping their gender off here now too. It’s about consent and privacy – as a parent, I want to protect my child, and they’re too young to really know what a blog is, never mind have lots of information about their life made public.

I am hoping to get back into the habit of blogging regularly, though not on a daily basis as I had aimed for in the past. Initially I’m aiming for twice a week, as there are four years of news to catch up on, but my minimum aspiration is for one new blog post per week.

Why now? Well, I’ve wanted to get back into writing for pleasure again. I’ve written a few things on Medium, but it feels like writing for a magazine; I’d rather stick to somewhere more personal that’s just about and run by me. I feel like I have things to say now, and hopefully the time to put those things into written words.

If you’re an old-time reader of my blog, welcome back, and I hope that this wasn’t too much of a surprise when it popped up in your RSS reader. And if you’re a new reader, hello. You can read my very dry ‘about me‘ page which is more focussed on my work, but I hope you’ll stick around and will get to know me better.

Goodbye Melody, Hello WordPress

https://www.flickr.com/photos/neilt/20932089/

It is with something of a heavy heart that I’ve decided to abandon Melody and move the blog to WordPress.

Long time readers will find this as a surprise – in the past, I’ve defended Movable Type when I’ve felt it under attack from WordPress ‘zealots’. Back then, WordPress was the new kid on the block, whilst Movable Type was much more established. Today, however, the situation has changed, and this is why I’ve made the change.

I left Movable Type earlier this year for a few reasons. Firstly, after trying Movable Type 5, I found it was aimed at large, professional blogs and not personal blogs like mine. The 4.3x line is still being maintained with security updates – MT 4.36 came out last week – but not with new features.

I hoped that Melody would provide a good continuation of MT 4.3x. Unfortunately I’m not that impressed – whilst it has improved some aspects of Movable Type, it hasn’t been the major step forward that I’d hoped it be. Furthermore, a number of plugins that I found really useful in MT didn’t work properly (or at all) in Melody, and as some of them were several years old and seemingly abandoned by their authors there was a slim chance of this happening.

It’s well known that the past few years has seen Movable Type stagnate. When I first started using it in 2002, there was a very active community developing plugins and themes for the platform. But this community has all but died out, and despite the best intentions of the Open Melody group it hasn’t re-ignited. The MT community is, basically, dead.

WordPress is where the community is. Whilst blogging in general is past its prime, WordPress still has a large number of themes and plugins which work with the latest version, plus active support forums. The documentation has even improved.

I’ve also changed. I don’t revel in spending all night adding new features and installing plugins. I want a blogging system that just works.

What made me choose WordPress is taking over administration for the web site for one of the student groups that some friends are involved in; this previously used WordPress and rather than try to shoe-horn it into Melody I decided to stick with it. The system proved to much easier, more manageable and more slick than MT or Melody ever was. Upgrades, in particular, were very easy. So having used it for a while, a few hours ago I decided to migrate this blog too.

Getting the blog up and running in WordPress has been pretty easy – the import process from Melody was quite straightforward and work fine. I’ve then spent no more than a couple of hours trying some themes and getting the configuration in place. Despite being a completely different system, migrating from Melody to WordPress has taken about the same time as Movable Type to Melody.

The current theme is somewhat temporary – I haven’t yet decided on a final one. In the meantime I’d welcome any comments you may have.

Why I’m not switching to WordPress

Now that I’ve announced the book, I’ve had a couple of emails on the lines of “So I’m guessing you’re not switching to WordPress now, huh?”, and indeed I’m not. The book, however, is not the only thing that’s keeping me with MT and I’d like to use this (rather long) entry as a list of reasons why I’m not likely to switch any time soon.

Firstly, MT is what I’m used to. As of the middle of next month, I’ll have been using it for 2 years – whereas I’ve been using WordPress for less than 3 months. It’s the same reason why I use Windows as opposed to Linux – sure, Linux may be more secure and less likely to crash, but I know how Windows works and I feel comfortable in that environment.

Secondly, there’s the templating system, which I’m afraid to say, sucks. Again, maybe I’m just used to how MT works, but altering the way comments display in WordPress requires a lot more time and knowledge than it does in MT. In MT, the templates are totally separate from the MT source code – in WordPress, that separation isn’t so finely defined. Indeed, when you edit wp-comments.php (in 1.2) you’re faced with a 20 lines of PHP that you can’t edit before being able to dig in. And even then, you get comments like “if you delete this the sky will fall on your head” – hardly reassuring for a newbie.

Want to alter how the RSS feeds display? Then you have to edit a page with lots of PHP code which can’t be removed for fear of the sky falling on your head, and with a warning about this being an integral part of WordPress. You also need to know what the file is called since it’s not linked in the WordPress interface. Adding new pages, especially new types of feeds, seems to require a good understanding of PHP – adding a new template in MT is far, far easier.

WordPress isn’t all bad though, and it’s a whole load easier to install than MT is. In fact, a newbie to blogging* would be better off installing WordPress than MT, and includes nice blog-centric features like a links manager. But if you want to control how your site displays and don’t know much PHP then MT is the way to go, in my opinion.

(* = a newbie to blogging would really be better off on a service like Blogger or Typepad, but if they wanted something they could run themselves, WP would be easier than MT)

WordPress also wins on the comments front, despite what I said above, since it has much better comment management features built-in (although in 1.2 they are rather hidden away). That said, MT is brilliant once you have MT-Blacklist installed, since it deals with all the duplicate comments and spam perfectly, but that isn’t included out of the box (though it will be available with MT 3.1).

Rebuilds seem to be a bone of contention with some – if your web server isn’t so fast, they can take forever. I’ve never really had that problem as my host’s servers seem to run well (and I have optimised MT a bit to make it faster) but some people do find that rebuilds take forever for them. With that in mind, I suggest you wait for MT3.1 which adds support for dynamic pages. This will give you the best of both worlds – pages that get requested often like your indexes and feeds can be static, whereas other pages can be generated on the fly as needed. Sure, you can install a caching plug-in for WordPress but it’s not something that’s there out of the box (in 1.2, at least). The result is that rebuilds will be much quicker since only 2 or 3 files are being regenerated each time, plus, unlike in WordPress, you won’t have the PHP preprocessor kicking in and doing an SQL query every single time someone requests your RSS feed.

Rebuilds are also quicker in MT3.x due to its more efficient use of SQL queries and background tasks. Since upgrading to MT3, this site has been a whole lot faster, though I am working a new search script to replace mt-search which is a little slow.

Both packages have plug-ins and while WordPress kicks MT2.x’s arse in that respect, MT3.x does have much better plug-in support and many more hooks to allow developers to integrate their plug-ins with the MT interface without needing to modify the MT source code (detect a theme here?). For example, with MT-Blacklist installed, the comments mass editor has a ‘despam’ link added for running comments through the blacklist and removing the bad ones. As more plug-ins designed for MT3.x are released I’m sure we’ll see some truly great plug-ins that integrate tightly with MT.

MT’s help is better. There are some very extensive help documents provided with MT, whereas WP has a few links back to its rather sparse documentation pages on its web site. There’s also the wiki but like many wikis it suffers from a lack of structure, and some areas are quite patchy, in my opinion. Trying to have information only display on an individual entry page meant having to use a seemingly undocumented PHP function, for example. Apparently the #wordpress chat room is a good source of help but I’m not comfortable with asking for help in chat rooms and it assumes that you have an IRC client and that you’re on a connection that doesn’t block IRC like my university does.

This is getting quite long but as you can see, I have my reasons for not switching. What this isn’t is a “WordPress sucks and I can’t believe you all use it” rant, it is merely pointing out that WP is not for me. I’m sure that when WP reaches maturity it’ll be much better and I may give it another look when it hits 2.1 or something, but I’ve yet to be totally impressed. MT is at 3.01 now and feels much more mature than WordPress does. That said, my test install isn’t about to disappear any time soon, though a test install is what what it will remain.

I’ll leave comments open on here – I know this may seem controversial to some of you so please play nice.