I’ve become increasingly fed up with Wordpress - particularly the fact that there seem to be millions of malicious hackers and spammers trying to get into your site. I’ve been short of time to do anything about this but the coronavirus locked means that I’ve finally got round to doing something about this. I’m currently rebuilding the content of my site (which will take a while) but, apart from tweaks, I’m happy with the new design.
I’ve had a number of Wordpress sites since 2012 and I guess I became reasonably proficient with Wordpress. For a few years, all was well and I must admit I became pretty complacent about security. Then, the inevitable happened. My installation was hacked and, because I’d used a network site, the hack affected all four sites that I had created.
Fixing this took a lot of work and I started to pay a lot more attention to security. I set up new sites with firewalls between them so that, hopefully, a hack to one of them wouldn’t affect the the others. I installed security plugins, deleted themes and plugins and tried to make the sites as secure as possible. Then, about 18 months later, I was hacked again.
I found the cause of the first hack but never got to the bottom of the second one. The hack added a script to all pages diverting users to various advertising sites and I simply could not work out how this happened. None of the scanners in the security plugins could find the problem and the warnings I set up to report when pages were changed were never activated. My conclusion was that maybe the hack came through my ISP rather than Wordpress but it was impossible to verify this. Fortunately, my firewalls worked so only one of my sites was hacked this time.
By this time, I was thoroughly pissed off with Wordpress. As well as its security problems, I didn’t like its bloat, its editor, its slowness and the fact that updates sometimes broke working sites. So I decided to find an alternative and rebuild my sites using that approach.
Static site generators
To avoid hassle, I thought the easiest way to make the site more secure was to generate an HTML version from the Wordpress source. I installed a plugin that generated a static site and created static versions of all of my sites. The plugin almost worked but a fair bit of manual tweaking was needed to get all the links working.
I was impressed by the speed and resilience of the static version of my sites but it only really worked for sites which hardly ever changed. Editing the site, in practice, meant recreating the Wordpress version, editing in Wordpress, regenerating the static site then manually fixing the bits that didn’t work. This was a grim way to work so I started looking around for an alternative approach.
I looked at various html editors and site generators (I had used Dreamweaver in the dim and distant past). I disliked the lack of control and always ended up editing the clunky and horrible generated html. Instead, I decided that I’d go down the static site generator route and started investigating possible options.
Static site generators create a static site for you and content is usually written in markdown. This suited me fine as I used Ulysses as my main text editor and markdown versions of all pages could easily be generated. There are lots of static site generators but eventually I chose Hugo because it looked simple to install and use although I suspect that it wasn’t much simpler than alternatives such as Jekyll. Creating a Hugo site is very different from building a Wordpress site so I have lots to learn and am still making rather faltering progress.
I’ve decided to restart writing occasional blog posts - it’s easy to build a blog with Hugo. This is my very first post in my new blog.