The Last Modified Date is a key feature on many websites. This can be a helpful feature 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.
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.
In this guide, I'll 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”
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.
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”.
You'll also be able to see the date when you are editing each post:
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:
- Orderby: Set this to Modified.
- 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”.
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.
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 Last 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:
Why two fields?
post_modifiedstores 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_gmtwill always store the same date and time in the GMT/UTC timezone.
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.
Summary of the Last Modified Date
We regularly recommend that users add the Last Modified Date to their WordPress posts. If you understand the limitations, this feature can be a helpful addition to your sites. Together with other information such as the Reading Time, you can give your readers important context about your posts.