Migrating a WordPress Blog: Any Advice?

I like this blog, honestly. But it’s very crufty by now, having had multiple generations of multiple plugins tied to multiple versions of WordPress, and I’d love to clean it up.

Anyone have any advice on migrating content from WordPress to a clean install of WordPress, such that I can add plugins carefully to create a cohesive body of work again?

Migrating WordPress to a New Server

I recently set up a new VPS, because there was a sale on an instance large enough to serve my needs (and then some) at a price point that I couldn’t ignore.

My old host was RamNode, and make no mistake, I’ve never ever had any qualms with RamNode – the customer service has always been above and beyond. If I was running a business on a VPS, I’d be quite comfortable using RamNode.

But I’m… not running a business. I host a few blogs, connect to IRC remotely, do some programming tests and things like that. I want a lot of reliability, to be sure, but my needs are really pretty light; I could probably get by with a small Linux box (maybe even a Raspberry Pi) on my home network, if I didn’t live in the boonies on a trunk that’s already saturated with my neighbors’ traffic.

So I’m migrating to SSDNodes. They were running a sale, like I said in the first paragraph, and how could I resist that?

That left actually migrating a few sites. The first site I migrated was AutumnCode, which is my actual primary domain. But that’s effectively a static site, and served mostly to confirm that I had nginx set up properly.

That left migration of the WordPress sites.

I’m a simple man; I actually set up each site to run on its own database, even though I could get by with a multisite configuration, so I needed to migrate each one separately (which served my purposes anyway; I could migrate the less important sites and validate that the migration worked, and work my way up to the “more important” sites, like the one you’re reading right now).

So first I backed up my NGinx configuration and my LetsEncrypt directory, as a whole. I then pushed all of those configurations to the new server.

I could have used the WordPress backup mechanism to move sites, I suppose, but I have some sites with a lot of media (images, etc.), plus that felt like a lot of work. What I ended up finding was a WordPress plugin, called Duplicator Pro. There’s a free version (Duplicator!) and it … works, but there are constraints for it.

Duplicator Pro was worth it, though. I got the cheapest version, because you can enable it and disable it per site.

It’s really easy to use. After installation and registration with a key, you create a “package” for a given site. A package consists of an archive (either a zip or a daf file) and an installer.php file.

You download those two files and store them. Then you create a database and a user for the site on the target system.

Next, you set up resolution so that you can refer to the new server by name – for me, that meant going to my desktop computer’s /etc/hosts file and adding an IP and a name. This means that the old server still works for anyone else on the Internet, but that I can work on the new server to install everything I need on it.

Now there’s some relatively easy work to do – copy the NGinx configuration file for the site into place (normally /etc/nginx/available-sites) and create a softlink in /etc/nginx/enabled-sites, along with making sure the directories for the sites exist. Then copy the package files into the HTML directory for the site.

After the directories are set up, restart NGinx.

You now actually have a “working site” although there’s nothing there that should be publicly available; installer.php might be (if you named it that, and I didn’t) but nobody else knows about it yet because the DNS records are still pointing to your old server. The only way someone else would reasonably hijack the process at this point is if they, too, had a custom name resolution set up with your server name and IP.

At this point, it’s all downhill. Open up the installer file’s name, whatever it is, and fill in the database credentials, and sit back and wait; Duplicator Pro replicates all of the old data and the entire filesystem of the WordPress installation from which you created the package.

It then asks you to log in as an administrator, and gives you an easy one-click process to delete the package’s files (which leaves you with a handy clean installation of your original WordPress installation).

At this point, all you have left to do – after clicking around in the new instance just to make sure things look right, and they should – is change the actual DNS records to point to the new host IP.

Don’t forget to change the A record (the IPv4 address) and the AAAA record (the IPv6 address).

After that, it’s a waiting game; normally DNS lookups are cached for an hour, so even if someone’s using your site actively, after an hour they’ll be using your new WordPress installation. They may have to log back in (if they’re logged in, of course) but that’d be the extent of the migration from their perspective (unless, of course, they added content while you were doing the migration; that content would be lost unless you do another backup and import.)

Really, a marvelously painless process.

My Fractured Writing Process

Yesterday I mentioned using Scrivener to write, and I mentioned that I have sort of a graduated process for writing that isn’t very efficient. I wanted to actually write down how I write, just to sort of collect what I do; maybe the documentation process will help me see it for what it is (“a mess”) and fix it some.

Here’s the thing: it’s very haphazard and very much cross-platform. All of it. I write on mobile devices (my tablet, mostly, but my phone as well), I write on Linux, I write on paper, I write on Windows (rarely, but still!), and usually on one of two Macs. One’s a desktop machine (upon which I’m typing right now) and one’s a MacBook.

The tools I have available at any time factor very heavily into how I write and what I write and where, often with negative effects.

Draft Simply

I rely really heavily on simple mechanisms: pen and paper, cloud storage, simple keyboards. I’ll start with a text editor more often than not – either WordPress (as I’m doing right now) or Day One, because they’re shared – if I’m on a walk and I dictate something into Day One, I know I can open up Day One on my Mac and see whatever it is I happened to say. Likewise, on WordPress, I can write it in one place and see it somewhere else.

Cloud storage has done more to free me than anything else.

I also tend to write in plain text; Day One has simple markdown-style formatting, as does WordPress; I don’t get wrapped up in style very often, although in WordPress I can – I keep wanting footnotes in WordPress just like I do in Word (which is why I rarely draft in Word).

So: the first step in my writing process is to draft simply.

Going Further

The next step in my writing process is to decide if there’s… more steps to follow.

Honestly, a lot of the stuff I write is just me capturing my thoughts so that my kids can see inside my head should they ever want to; I’m really writing to them.

So a lot of editing would actually work counter to what I’m trying to accomplish; I don’t want my kids to see a sanitized version of me, I want them to see how I think and why I think what I think, to hear my voice and my motivations.

When I write directly, with little editing, you’re getting what I actually would “sound like” as long as you cut out all the stuttering and pauses and moments where I … you know, lose what it is I’m trying to say as I’m trying to work it out.

That – the loss of what I say as I’m trying to say it – happens a lot. I get distracted. A lot of my writing gets discarded because of that; I’ll look at it, and see where I hopped off the tracks, and think to myself, “This is not worth knowing or reading; it communicates my confusion, not my soul,” and … into the bin it goes.

Day One is fantastic for this; I have a lot of rather confusing journal entries. They’re embarrassing, really, but for the right reasons; they’re not embarrassing because I’m betraying some deep, dark secrets, but because they’re rather silly even in their own context.

Anyway – did you see how I got off track, right there? – after I’ve drafted something in a simple medium, the question is: what next?

A lot of times, it’s pretty simple: hit publish! I said it, go to … well, not “print,” because a lot of it’s online, but go “live.” That’s fine, that’s the whole purpose of a lot of things I write, like this piece itself.

I’m writing “raw,” and publishing “raw” is the whole point.

Going Formal

If the answer to the “next step” isn’t “expose it to everyone, flaws and all,” then it’s time to get serious. Here, I’ll crank up a real tool – it’ll be either Scrivener or a mind mapper of some kind.

A mind mapper – Freeplane, XMind, or MindNode, for example – is where I’ll take the draft’s points if I think they’re solid but disorganized. A draft is going to be completely burned down to the ground if I take it to a mind mapper; this is usually a completely destructive, but entirely useful, process.

It’s where I look at the structure of what I have written, and extract the useful bits. I’ll use them to rebuild a structure from the ground up.

In my opinion, my best works – not my most artistic works, but my best – come out of this process.

The next destination – mind-mapped or not – is likely to be Scrivener, where I’ll either transcribe the mind map into text to be moved about, or I’ll just copy the draft and then edit it there, with notes. This is a fairly formal drafting process – this, or the mind map, are the first times I usually actually try to apply process to writing.

Scrivener allows me to make notes about what I’m writing (much as mind mapping allows me to make connections between concepts). Scrivener also allows me to focus on the drafting process without getting tied down by the editing process, which is a big deal (and, again, why I avoid Word for writing, usually).

Final Production

The next step is to compile the work from Scrivener into a Word document.

I’ll then read… and read… and reread… and read again until I’m sick of it, applying edits and notes back in Scrivener and republishing.

Once I’m happy with it – or once I’m so sick of it I can’t read it any more – I’ll do a final compilation with Scrivener and send off to a publisher… or copy it from there back to WordPress or wherever its final destination will be. This part’s usually pretty light.

There’s More Than One Way

Of course, if it’s not clear already, there’s more than one way to do it.

That Day One -> Scrivener -> Final Destination process is probably what I do most often, but it’s not the only way.

I also draft with Asciidoctor, and do the same render/edit cycle there that I do with Scrivener (including the mind mapping stage).

I wrote a book this way, for example, and there were a lot of really good aspects to this… and some really unfortunate aspects to it. The problem AsciiDoctor has is exporting to Word format, which is the lingua franca of publishing; the Word conversion is… problematic.

(There’s more to it than that, too, but this is not the right forum for that.)

Anyway, how about you? What do you do?

New Ubuntu Version!

I upgraded Ubuntu to eoan, 19.10, this morning, and WordPress broke. I was getting 502 Gateway errors, which is never comfortable.

What the 502 means is that nginx was not able to connect to the backend service, which is php7.3-fpm in this case.

I have nginx set up to forward to php-fpm to 127.0.0.1:9000. This is relevant.

The solution was really pretty simple: go to /etc/php/7.3/fpm/pool.d, and edit www.conf.

There will be a line with listen = /run/php/php7.3-fpm.sock ; change that line to listen = 9000 and now the socket connection is listening on port 9000 on localhost. Everything works again.

I’d still love to find a way to move off of WordPress without having to go through a massive porting process (and then a mad search for functionality, which is the bigger problem) but for right now, WordPress suffices.

Volt, considering moving away from WordPress

Ah, new things and directions….

  • Someone on IRC this morning mentioned Volt.ws, a messaging client available for Windows, MacOS, and Linux. It’s really tiny. It’s also missing a lot of functionality still, but it can connect to Slack… and it’s tiny. It still doesn’t support Slack private messages, but once it gets those (which should be in February 2019) it might be my preferred Slack client, over Slack’s own and Franz… because Slack’s client is awful on system resources and Franz is worse, despite being a better client.
  • I have been trying to figure out ways to move on from WordPress. It’s not really WordPress’ fault… I want Asciidoctor support, for one thing, and I’m rather disheartened at relying on an application written in PHP. But the alternatives require more time than I have right now, and I’m really not thinking I could personally design a good user interface if I wrote my own software. I’ve considered Jekyll and Hugo, but I’d really want to work out the comments mechanism before moving on. Plus, I am used to running software live; a static site feels odd.
  • I wonder how many programming advances have been created in an attempt to simply avoid boredom on the part of the programmer.
  • I’ve been considering trying to echo these things on Medium just to see what the differences in exposure would be.

Outrage on Social Media articles; State of the Union

Things I’m thinking about, after switching back to a list-based list of thoughts because Gutenberg headers annoy me:

  • Gutenberg headers annoy me. I’m thinking of switching back to my comfortable editing process where I’m not constantly griping about my editor. It’s a flow thing.
  • Good article from Medium, paywalled (so if you don’t have a Medium account that you pay for – it’s $5/month – you may have to open this in a private window): The Power of Not Retweeting. Both the article and the subject are recommended. It’s very easy to be outraged by something that lacks context, and the context might make all the difference in how you actually react – but by the time you get context, it’s too late, you’ve committed your reaction to history and told all your friends.
  • Another excellent Medium article, this time from the New York Times’ Medium account: This Is Your Brain Off Facebook. It’s a little ironic that the NYT published this, given how manipulative they are for their readers… but the king of manipulation is still CNN in my opinion. Those guys should be ashamed. Their editors should be doubly ashamed.
  • I did not watch the State of the Union, but having people tell me that I shouldn’t watch it as a form of protest annoyed me and tempted me to endure the farce anyway. I want our politicians to love country over party, and that’s… not what we have right now.
  • Why didn’t I want to watch the State of the Union? Lots of reasons:
    • It’s Trump. His mode of speaking annoys me greatly. His inability to stay on topic annoys me. His stupid self-propping annoys me. I used to think George W. Bush wasn’t a particularly effective speaker because he always seemed to be searching for words – and now I find that I’d far prefer a President who actually searched for the right words to one who blathers out whatever foolish crap crosses his brain at any given time.
    • Do I need another reason? Oh, yeah.
    • The endless politicization of everything, and the seeming need to turn everything into a protest. I’m all for protesting police brutality, but sometimes a football game (or a State of the Union address) is … just a football game, and the protests don’t really make a difference besides signalling.
    • Circling back: I don’t trust Trump… or his opponents. They both lie. They both choose truths based on what plays to their bases. What’s funny is that Trump told us what he’d do in his campaign… and he’s actually held to that pretty strongly, for better or for worse. That’s somewhat commendable. His political opponents are changing their long-held opinions on lots of things just so they can oppose Trump – I’ve said before that he should just start echoing their campaign positions just to force them to change stances.
    • This is a lot less relevant of a list than I thought it might be.
    • Every State of the Union I’ve ever watched has bored me! There, there’s my best reason right there.

Super Bowl, Commercials, Gutenberg Headings

Okay, I’m going to try the header format thing again, because it’s something new and different (for me) in WordPress’ Medium-style editor. But here are the things I’m thinking about:

The Super Bowl

I tried to think of a cute pun for the title, but “The Super Bah” was dumb. I came up with others, but that’s still the best of them, and it’s not any good.

The Super Bowl, Part II

You let us down, Jared. I kept thinking you were a University of Georgia graduate too (just like Todd Gurley, the stud running back who was underused during the game).

Why did I think you were a Georgia QB? Because you kinda sucked on the biggest stage football has. You killed your team, Jared. You killed your team.

The only saving grace for the Rams was that the refs rather clearly wanted the Patriots to win, with a runner being called “defenseless” after he caught the ball, to preserve a drive when the Rams’ impressive defense got a critical and impressive stop.

I enjoy defensive battles… but this was a battle of a good defense against a good offense (when New England had the ball) and a good defense against an overmatched toddler (when Los Angeles had the ball.)

I wish the refs hadn’t given the Rams the win against New Orleans.

(After rereading this section, I sound a lot angrier than I actually am – I was neutral about the game, and thought mostly that Jared Goff was outmatched, as he apparently was. I’m okay with the Patriots winning; they earned it. The Rams defense was stellar. The offense was… less than stellar.)

Best Commercial

The best commercial of the night was a local one, for Michael and Sons, an HVAC company local to the Virginia area.

It had two football players (kids, like pre-teens), with one “tackling” the other – pretty gently, it was like they told him to push the other one down – and, after the tackle, a thrown ball hits the tackler in the backside. The ref then waves “incomplete pass!” — just like the Saints/Rams refs, except with a parody.

We’re not normally Michael and Sons customers – not only was our home built with a different HVAC company, but we actually know the owner of yet another HVAC company – but dang, that commercial was so on point that we talked about switching.

Hopefully a video will show up online of that commercial (and hopefully I remember to look for it so I can link to it.)

The ASMR commercial was the other notable commercial. Apparently people were creeped out by it. I don’t know – I found it fascinating, mostly because I didn’t recognize the ASMR aspect of it until later. But it was for a … beer, I think, so maybe as a commercial it was intriguing but not all that effective, because I might switch HVAC companies but I am not drinking that beer.

Gutenberg

Now that I’ve used the heading stuff in WordPress’ editor, my first impression is that I do not like it. I’ve been trying to give this editor a spin for a while, to give it a fair shake… and while it has some nice features (pasting a URL over selected text converts it to a link!) it’s mostly annoying

Open Source Blog Software

I keep wanting to move away from WordPress, because I’ve been using it forever and I keep thinking there’s a Platonic ideal that isn’t WordPress.

However, most of them are in PHP – violating the Platonic ideal – and the ones that remain are either static site generators (Jekyll, Hugo) or node.js implementations (ghost), or things that are documented really inconsistently (typo/publify). I thought about roller, but…

Busy, new music, Getting Things Done, data import

It’s been a while since I’ve posted anything here. I’ve been busy. But now that I’m here…

  • I’m still not thrilled with the Gutenberg editor. It’s okay, but I just don’t care for it.
  • I’ve been working on music, and that’s been eating what time I have left after work and family, so I haven’t been writing much. This is a problem; the whole point behind these is that I should be able to fire them off pretty quickly and easily. It’s a brittle process.
  • A friend suggested Todoist, over Agenda. Will have to try it again. There are tons of GTD-like to-do applications, and all of them so far get it slightly wrong for me… or maybe I’m not integrating them well enough yet. Agenda’s pretty good but Mac-only. Until I’ve purged every other OS from my work environment, that’s… ungood. (And I’m not going to purge every other OS from my work environment.)
  • Running a giant data import is great, until you realize you’ve done it wrong but you’re already a long time into a giant, days-long process.

Blogging, getting wordpress running properly on Ubuntu

Things I’m thinking and feeling:

  • I really don’t “blog” all that much. I record, I guess, and that’s sort of a “web log,” but I really don’t expose much of my innermost feelings – it’s like observations with a mirror in the way. I’ve always been that way when I write. Always.
  • Today I’m going to try something different.
  • I feel horribly sad today. Not really empty, not really morose, just… not even tired, but mournful, and I don’t even really know what it is I’m mourning. Maybe it’s memory, all the memories I feel like I could have had but don’t, maybe it’s the memories I do have but shouldn’t. Maybe I’m mourning the fact that I don’t know if I’m what I should be. But today, Me, I’m down. I’m not feeling bad, I’m just down.
  • I finally fixed some problems with my WordPress installation. When I upgraded to Ubuntu 18.04 on my server, apparently some PHP plugins didn’t get installed/migrated/somethinged – I went to a page on installing the LEMP stack on Ubuntu, installed the system dependencies, and lo and behold, things started working better again. Annoying, because this stuff’s been broken for a long time. Now if WordPress would only track the same hits that I see in access logs…
  • After a long dry spell, I’ve been writing poetry again. This is a good thing, but as usual my poetry is inspired by my mood, which is not a good thing. Oh, well. Maybe some of it will be worth publishing.
  • I also finally have been grinding my way through some new-ish music. Hurray.
  • I wonder if CNN – or any other news source, really – would be improved if you removed all the adjectives and subsidiary clauses. Some important information would get lost, but honestly? Most of the adjectives and subordinate clauses are used by the “journalists” to insert their opinions into the news, to sanitize it for the tribe most likely to read that particular bit… or enrage the tribe for which the bit isn’t targeted.

Flit, Trump’s Address on 19 Jan, Elite: Dangerous

Things that are crossing my path lately:

  • Flit, in context of “Python Packages and You.” Python packaging is not a strength of mine.
  • I hate to say it, but the Democrats’ rejection of Trump’s offer to open negotiations about the government now look kinda stupid, based on their oppositions. They’re saying that a three year suspension of some of the deportations and other such hot-button issues … basically, getting the things they wanted was not enough. They’re idiots. Sure, he is one, too… but the whole three year delay for the application of law gives Congress three years to fix the law, which is what Trump said they should do when he said he was going to resume deportations in the first place! In other words, from me to them: Congress, do your flippin’ jobs. If Congress wasn’t relying on executive power to do what Congress was meant to do, a lot of this mess would have gone away, but they keep digging in their heels and saying “no.”
  • The worst thing about Elite: Dangerous is how long it takes to get into a gaming session. The best thing about Elite:Dangerous is “pretty much everything else.”
  • I just realized I can select a region in WordPress’ editor, and then paste a URL – and the region is converted to an HTTP anchor automagically. Now that is useful.
  • Few things are both more and less amusing than watching someone stomp about, screaming “I am not a prima donna!”