Title: incorrect the_modified_time / post_modified
Last modified: June 21, 2021

---

# incorrect the_modified_time / post_modified

 *  Resolved [Peter_L](https://wordpress.org/support/users/peter_l/)
 * (@peter_l)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/incorrect-the_modified_time-post_modified/)
 * Hello,
 * I have a wordpress site that is close to 10 years old. I recently altered the
   template files so single posts would display the date they got updated on instead
   of the date they got published on.
 * To my surprise, every post that was published or updated before 6 februari 2021
   now shows 6 februari 2021 as the_modified_time. The posts that were published
   or updated after 6 februari 2021 show the correct date.
 * I retraced my steps and remembered that on 6 februari 2021, after publishing 
   a post, I saw the yoast notification to index a site’s SEO data (14.0 update).
   I then ran the indexing proces. Everything seemed fine and I forgot about it.
   This seems to explains the date.
 * I then went into the actual DB and found that in the table wp_posts, each row
   still has the correct date (the post_modified field). However, when I went into
   the wp_yoast_indexable table, there, the rows have the incorrect date (the 6 
   februari) in the post_modified field.
 * Wordpress site diagnose has been shouting at me for a while that my sql is outdated
   and I should be using a sql version higher then 5.6. (I’ve been putting this 
   off since I have no clue how to do this or solve problems doing this) I just 
   mention this cause it might have something to do with the indexing proces.
 * So, here’s my question: how do I fix this. It doesn’t only affect the post date
   I display to visitors but also the json-ld and the sitemap. Can I rerun the index
   proces somehow of can I alter some hook? Any ideas?

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [devnihil](https://wordpress.org/support/users/devnihil/)
 * (@devnihil)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/incorrect-the_modified_time-post_modified/#post-14581041)
 * [@peter_l](https://wordpress.org/support/users/peter_l/) We’re sorry to hear 
   you are experiencing this issue on your site.
 * To resolve this, can you please try the following?:
    -  **1.** Install & activate the [Yoast Test Helper plugin](https://wordpress.org/plugins/yoast-test-helper/)
      **
      2.** Go to Tools -> Yoast Test **3.** Hit the “Reset Indexables & Migrations”
      button **4.** Under SEO → Tools, click the “Start SEO Data Optimization” button.
 *  Thread Starter [Peter_L](https://wordpress.org/support/users/peter_l/)
 * (@peter_l)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/incorrect-the_modified_time-post_modified/#post-14584244)
 * [@devnihil](https://wordpress.org/support/users/devnihil/) I followed all the
   steps on a local copy and it didn’t solve the issue.
 * I did it a first time, checked and it still showed the 6 februari date.
 * Then I tried it a second time. I first hit the reset indexables and migrations
   button. Checked the DB, the wp_yoast_indexable table was empty. I checked the
   site front-end and it was still showing the 6 feb.
 * I then hit the “Start SEO Data Optimization” button. The DB now had a full wp_yoast_indexable
   table and the rows now have fields created_at and updated_at with todays date:
   2021-06-22 14:05:40.
 * The front-end of my site however is still showing the incorrect 6 februari 2021
   date. The DB table wp_posts still has the correct dates in the post_modified 
   fields.
 * I don’t understand where wp is getting this 6 februari date from.
 *  Plugin Support [Maybellyne](https://wordpress.org/support/users/maybellyne/)
 * (@maybellyne)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/incorrect-the_modified_time-post_modified/#post-14584798)
 * Hello Peter,
 * Does clearing your cache from your theme, plugin, server, CDN like Cloudflare
   or browser resolve the issue? If you are not sure how to clear cache from theme/
   plugin please speak to those authors. If you want to clear cache from the server,
   please speak to your host provider. To clear the cache from a browser use this
   guide: [https://kb.yoast.com/kb/how-to-clear-my-browsers-cache/](https://kb.yoast.com/kb/how-to-clear-my-browsers-cache/).
 * Also, if you go to WordPress → Settings → General, can you confirm the timezone
   and formats are set correctly?
 *  Thread Starter [Peter_L](https://wordpress.org/support/users/peter_l/)
 * (@peter_l)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/incorrect-the_modified_time-post_modified/#post-14585146)
 * I also thought it might be a caching issue. So, I did clear my browser cache 
   and the caching from my website (wp fastest cache). I cleared the cache from 
   inside the plugin, deactivated the cache and manually checked the caching folder.
   It was empty. So, I’m absolutely sure it wasn’t the caching plugin.
 * General settings seem to be fine: timezone utc+1 date notation 21 june 2021 time
   notation 20:40.
 *  Thread Starter [Peter_L](https://wordpress.org/support/users/peter_l/)
 * (@peter_l)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/incorrect-the_modified_time-post_modified/#post-14585165)
 * Wait, on closer inspection of the DB. I found that I was wrong about the post_modified
   fields in the wp_posts table rows. I probably didn’t realize I was looking at
   a revision or auto-save row (post_name field).
 * Now that I filtered that out, I can see that the post_modified fields are in 
   fact correct. I still don’t know where that date came from but there is no more
   link with yoast. Gonna close this topic down.
 * Thank you for the help.
    -  This reply was modified 4 years, 11 months ago by [Peter_L](https://wordpress.org/support/users/peter_l/).

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘incorrect the_modified_time / post_modified’ is closed to new replies.

 * ![](https://ps.w.org/wordpress-seo/assets/icon-256x256.gif?rev=3419908)
 * [Yoast SEO - Advanced SEO with real-time guidance and built-in AI](https://wordpress.org/plugins/wordpress-seo/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordpress-seo/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordpress-seo/)
 * [Active Topics](https://wordpress.org/support/plugin/wordpress-seo/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordpress-seo/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordpress-seo/reviews/)

## Tags

 * [the_modified_time()](https://wordpress.org/support/topic-tag/the_modified_time/)

 * 5 replies
 * 3 participants
 * Last reply from: [Peter_L](https://wordpress.org/support/users/peter_l/)
 * Last activity: [4 years, 11 months ago](https://wordpress.org/support/topic/incorrect-the_modified_time-post_modified/#post-14585165)
 * Status: resolved