How to Use the Last Modified Date for WordPress Posts

Last Modified

The Last Modified Date is a useful WordPress feature that shows when content was last changed.

This can be helpful if you want people to know when the post was updated. I've seen this used for news articles, documentation, and even legal and technical information. It can also be helpful if you use a content schedule to plan your WordPress content.

The Last Modified Date does not appear by default on most WordPress sites. You won't see it in the WordPress admin area, or on the frontend.

I'm going to show you how to enable this feature on your site.


How to Show the Last Modified Date

I recommend the “WP Last Modified Info” plugin as an easy way to show the date of the most recent change.

  • Install this plugin.
  • Go to “Settings” then “WP Last Modified Info”.
  • Enable the option shown below: “Enable for Posts/Pages on Frontend”
Insert Last Modified
Insert Last Modified

That's all you need to do for most themes. You can now see the date on your posts and pages. Below this first setting are other options, so you can customize the display of the date.

If you want to add the date yourself, the plugin will also provide you with customizable code to add to your theme's files.

Html Template Modified
Html Template Modified

This plugin will also show the Last Modified date for you in the admin area. You will be able to see it on the “Posts” screen”.

Admin Area Modified
Admin Area Modified

You'll also be able to see the date when you are editing each post:

Screen Shot 2021 02 04 At 11.31.31 Am
Screen Shot 2021 02 04 At 11.31.31 Am


How to Show Recently Updated Posts

If you want to show a list of recently updated posts, one plugin to try is “Recent Posts Widget Extended“. It hasn't been updated in a while, but it still works.

When you add the widget, make sure to change the two settings you see below:

  1. Orderby: Set this to Modified.
  2. Display Modification Date: Enable this option.

If you enable the “Use Relative Date” option, that will show how recently your post was modified. For example, it will show “38 mins ago”, or “7 days ago”.

Widget to show modified posts
Last Modified Widget

How to Change the Last Modified Date

You may want to change the modified date. One way this can be useful is if you are using a “Show Recently Modified Post” display for posts.

The “WP Last Modified Info” plugin can do this for you. If you don't need all the features in that plugin, there is a simpler option called “Change Last Modified Date” that makes it very easy to change the modified date without going into the database.

If you install this plugin, you will see a “Modified” field on your content. You can use this to easily change the Late Modified date. If you enable the “Freeze modified date”, it won't update if you make any more changes to this post.

Last Modified Date
Last Modified Date

How to Show the Last Modified Date in a Theme

Earlier in this guide, we did show you how to display the date with a plugin installed. If you don't want to use that plugin, you can add PHP code to your theme. You can get this code by visiting WordPress.org.


How to Find the Modified Date in the Database

The place to look for the date in your database is the wp_posts table. The date is stored in two places:

  • post_modified
  • post_modified_gmt.

Why two fields?

  • post_modified stores the date and time for the last entry according to the TimeZone of your web server. So if you server is in New York, the entry will be stored on Eastern Time (UTC/GMT-4).
  • post_modified_gmt will always store the same date and time in the GMT/UTC timezone.
Wp Modified Database
Wp Modified Database

If you want more, check out our complete guide to WordPress user permissions in the database.


The Last Modified Date and SEO

Vijay from ApartmentTherapy read this post via our Facebook group and offered some wise advice for using this date. He notes that it can be worth distinguishing between minor changes and major changes that visitors will want to know about:

We've wrestled a lot with the value of Last Modified Date. At larger publishers like ours, we eventually realized that Last Modified Date, especially when presented on the front end of an article, wasn't the right date for us to be using or signaling to Google for SEO purposes. We had to distinguish between truly refreshed / updated content (significant rewriting, often for SEO purposes) and minor updates (typos, grammatical corrections, updating a link, etc.). We ended up creating an extra “Update Date” field which a writer could set on an already-published post, and which we would send in the structured data and display on-site. We effectively only use Last Modified Date for internal purposes to track revisions, etc.


Leave a Reply

Your email address will not be published. Required fields are marked *

Professional publishing plugins for WordPress! Get PublishPress

  • SUBSCRIBE TO OUR NEWSLETTER
  • SEARCH THIS SITE