How to time travel using WordPress

Disclaimer: this is how it currently works; I offer no guarantees that this information is valid in your epoch!

The only constant is change.

Heraclitus (c.535 BC – c.474 BC)

The ‘permalink’

Each WordPress post is allocated a permalink (short for ‘permanent link’), a URL (‘web address’) that needs to remain the same after publication. It has to be permanent, or the web would simply unravel.

Importantly, a permalink is generated when a post is scheduled for publication in advance — and this feature enables time travel. Well, hyperbolically, anyway (yep, my post title was clickbait; sorry about that 😅, hope you forgive me — and if not, thanks for coming and enjoy your day!).

Time travel into the past

That’s easy; we do it every time we follow a link to a published post.

Time travel into the future

This may seem like a bit of a digression, but bear with me, please; there is method in my madness. Well, I think there is.

Towel Day 2021 -- 91 days to go as at 23Feb2021

Regular visitors to Wibble may have noticed that I’m a fan of The Hitchhiker’s Guide to the Galaxy by the late, great Douglas Adams. As such, along with a great host of fellow-minded lunatics, I celebrate Towel Day each year on the 25th of May. For last year’s festivities, I composed a trivia quiz, one that was so well-received that I was encouraged to create another one for 2021. And another for 2022. And, yes, I got carried away, and made one for 2023, too.

Naturally enough, I wanted to ensure that I didn’t forget about these posts. It would be all too easy to lose them in the quagmire of my WordPress drafts. And so, even though the dates were far off in the future, I scheduled them for publication. They will go live on their respective dates, even if I get run over by a bus (assuming that WordPress is still around, naturally — hopefully that’s not an issue).

WordPress offers the ability to copy the permalink when scheduling or publishing

The point is that, when you schedule a post, WordPress offers the option to copy its permalink, enabling you to refer to it in advance. This is the link to the Towel Day 2021 quiz — if your ‘now’ is before 25May2021, don’t bother clicking that link as the post is not yet live; it will present you with a ‘404 error’§. I shared that link with the froods at towelday.org, and they were hoopy enough to put it on their website — and because of that, if I make any changes to that post, I have to be careful not to upset its permalink. Because, as it turns out, the ‘perma’ part isn’t so permanent after all….

The not-so-permanent permalink

The construction of a permalink is pretty standard. It’s composed of various parts:

https://[domain name]/[YYYY]/[MM]/[DD]/[slug]
  • [domain name] is, well, it’s the domain name, innit?
  • year, month and day (YYYY, MM, DD) are the publication date
  • [slug] is based on the post title (with spaces replaced by hyphens, and characters that aren’t legal in a URL removed)
Screen clipping of the 'permalink' information in the WordPress editor
The permalink information can be found in the ‘Post’ section of the WordPress editor

The final permalink is allocated when the post is published. Although it is possible to change this, doing so would be unwise as you never know who, or what, may have linked to it. The WordPress Reader, for instance, is probably one of the first things to grab and use a link to a published post.

Before publication, a temporary permalink is generated while the post is being developed; and, importantly, this permalink can change.

While the post is in draft (and before it has been scheduled), the slug changes dynamically to reflect the current title.

When a post is scheduled, the slug part (only) of the permalink lives up to its name: it becomes fixed. It will no longer change dynamically, so if the title is altered it may be necessary to consider amending the slug (which then changes the permalink) to match. This is true even if you revert the post to draft. I believe this behaviour may be a bug (sorry, I mean ‘feature’), as the date portion of the permalink does still change to reflect alterations to the publication date, even on a draft that was previously scheduled.

When a draft is manually saved (by hitting the ‘Save draft’ link in the editor), any changes to the publication date (year, month, day) are reflected in the current permalink. Note that autosave doesn’t appear to do this every time (though I could be wrong about that).

It’s an unlikely scenario (one I haven’t tested), but I suspect that if the domain name were to change between scheduling and publication, the post’s URL wouldn’t reflect this change. For example, if I were to register the name ‘wibble.blog’ again, and set it as the main site address as I once did (I explained the reason why I reversed this in an earlier post), the permalink of this post would, I think, retain ‘pendantry.wordpress.com’ as the domain name.


§ A caveat: Usefully — but also confusingly if you’re not aware of it — WordPress provides the illusion of being able to actually ‘visit’ a post that’s scheduled for publication in the future; it doesn’t report a ‘404 error’ iff the post is on your account and you’re currently logged in. The Towel Day 2021 quiz post appears, for me, in my browser as though it’s live — even though there are still (currently) 91 days to go:

An image from a post that doesn't actually exist yet

About pendantry

Phlyarologist (part-time) and pendant. Campaigner for action against anthropogenic global warming (AGW) and injustice in all its forms. Humanist, atheist, notoftenpist. Wannabe poet, writer and astronaut.
This entry was posted in ... wait, what?, Communication, Computers and Internet, Education, Phlyarology and tagged , , , , . Bookmark the permalink.

5 Responses to How to time travel using WordPress

  1. Hi , I got click baited… lol. I never thought linking to scheduled post. But I guess if the post that your working on is being scheduled after the first scheduled post then it would be fine. I always link to post after posting them, never gutsy enuf to prelink. Or rather I don’t blog that in advance to try.

    You know so much about the technical side if wordpress.com

    Thank you for this useful insight

    Liked by 1 person

    • pendantry says:

      I like the term ‘prelinking’ :) Yes, the problem with, er, ‘prelinking’ is the fact that premature clicks on them end up in a ‘404’, which is usually dismissed as an error, and so it’s probably a bad idea to over-use them because it makes it appear as though the site’s designers don’t know what they’re doing. (In my case, that assumption is usually justified.)

      Liked by 1 person

I'd love to hear what your views are!

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.