Skip to main content

Senior WordPress platform developer. Open web / Music. DJ (under @CloudseerDJ). Tall Dutch guy.

What is the meaning of a site's Last Updated property?

2 min read

When running a WordPress multisite, in the site directory each site has a Last Updated property. I previously incorrectly assumed this reflected  when the site's metadata changed, for example the site's attributes. However, archiving and deactivating a site does not change the Last Updated value, so what does it do in WordPress 5.2.1?

As usual the best place to look is the WordPress codebase. It turns out that, on a multisite, this value is updated whenever a post is updated or deleted. It reflects the last content update, not the site's metadata.

By inspecting the html and looking up the property name, we find that the function that updates this is called wpmu_update_blogs_date and there is an action hook wpmu_blog_updated that receives the site_id variable. This function can be called whenever we want to update the value. It isn't used anywhere else.

If we're looking to update this date whenever the site's status changes, then via the same process it appears that he actions to hook into site attribute updates are in wp_maybe_transition_site_statuses_on_update so one could write a quick mu-plugin that updates the Last Updated property whenever these fire.

I miss having tildes in username URLs!<p>#status </p>

So I’m trying to make a tool that also happens to post to twitter but the way they want things to work means every user needs to apply to become a developer or I have to run a man in the middle webservice. Makes no sense.<p>#status </p>

Wagtail on , on top of Django 2.1. Static files fixed by ./ collectstatic!<p>#status </p>

Policing by numbers, a great podcast: applies to all automated reporting.<p>#status </p>

<p style="text-align: left;">There’s a great deal on for <a href="">Acorn</a> my favourite macOS image editor.</p><p>#status </p>

Close second gem of the day is PythonAnywhere this might just make it so trivial to start this music related project I’ve been thinking of.<p>#status </p>

Super find of the day: <a href=""></a>. Great tech, happily supported the iOS app.<p>#status </p>

It turns out I was trying to reinvent Trello with my todo list + notes mashup. But self hosted online, so instead signed up to Trello gold.<p>#status </p>

The <a href="">source to the website</a> is available on GitHub.<p>#status </p>