Wrong Last Updated Date

Stop WordPress From Updating Your Posts’ Modified Date (Rank Math)

If you use Rank Math on your WordPress site, there is a good chance your posts are updating their “last modified” date every time an editor saves, even for small changes that have nothing to do with actual content improvements.

A typo fix. A broken image swap. A formatting tweak. WordPress timestamps all of it the same way it timestamps a major content rewrite. And that matters for SEO.

That does not mean every minor edit will hurt your rankings, but it does mean the modified date may no longer accurately represent when the content was meaningfully updated.

Rank Math includes an option to prevent this, but it has one frustrating limitation: you have to remember to enable it every time you edit a page.

We originally solved that problem with a code snippet. We have since turned the code into a standalone WordPress plugin that can be downloaded, uploaded, and activated like any other plugin.

No code copying. No editing functions.php. No manually creating a mu-plugins file.

Why the Modified Date Matters for SEO

Search engines use the modified date as a freshness signal. When a page gets a new “last updated” timestamp, Google may recrawl it and reassess it, which sounds good until you realize the reassessment is based on a post where nothing meaningful changed.

There are two dates attached to every WordPress post:

  • Published date — the date the post first went live. This rarely changes.
  • Modified date — the date the post was last saved. This updates every single time WordPress saves, unless something stops it.

Google uses both. The modified date carries more weight in terms of freshness signals because it tells Google when content was last touched. If your modified date is updating every time someone fixes a comma, you are essentially telling Google the page changed when it did not. That is not a signal you want to send, especially on older content that has been ranking well.

For articles, Rank Math commonly includes datePublished and dateModified information in its schema markup. That gives search engines a machine-readable indication of when the page was originally published and when it was most recently updated.

The problem is that WordPress does not understand the difference between a meaningful content update and a minor administrative edit. It simply knows that someone saved the page.

That can produce a modified date that suggests a substantial update occurred when someone actually corrected one word or replaced an image.

Google recommends updating the visible date when an article has been significantly changed. It also advises against artificially freshening a page without adding meaningful new information.

The goal is not to prevent modified dates from ever changing. It is to make sure they change for the right reasons.

When Should the Modified Date Actually Update?

This is worth spelling out because it is not always obvious.

The modified date should update when you make a real change to the content: rewriting a section, adding new information, updating outdated stats, changing your recommendation on something, or making an edit that genuinely improves the page for the reader.

It should not update when you are fixing a typo, swapping a broken image, adjusting spacing, tweaking a heading for formatting reasons, or making any other change that does not affect what the page actually says or how useful it is.

There will always be judgment calls. A heading change could be purely cosmetic, or it could substantially improve the organization and clarity of an article. Replacing one paragraph might be minor on one page and significant on another.

The problem is WordPress does not know the difference. Every save looks the same to it.

Most Saves do not deserve a last updated date

The Rank Math “Lock Modified Date” Toggle

Rank Math has a feature built specifically for this called Lock Modified Date in the WordPress block editor. When it is enabled, saving a post leaves the modified date alone. The page keeps its existing date, and you control when the timestamp actually updates.

It’s a useful feature, but the catch is that the toggle is off every time you open the editor. There is no setting in Rank Math to change that default. Every time you make a minor edit on the site, or your content editors make an edit, you have to remember to turn it on before saving. The simple truth is that you won’t remember to do this. We’ve made this mistake dozens of times over the years.

If you have multiple people editing content on your site, this becomes a real problem fast.

What We Built

We Turned Our Original Code Into a WordPress Plugin

Our original solution was a small PHP and JavaScript snippet that automatically enabled Rank Math’s Lock Modified Date toggle when the editor loaded.

The code worked, but installing it was not especially friendly for the average WordPress user.

You had to add it to a theme’s functions.php file, install it through a code snippets plugin, create a site-specific plugin, or manually place it in the mu-plugins folder.

Those are all valid options for a developer, but most WordPress users do not want to edit PHP files just to change the default position of one toggle.

We have now packaged the solution as the Big Red SEO Rank Math Modified Date Lock plugin.

You can download the latest release as a ZIP file and install it through the normal WordPress plugin uploader. After installation, the plugin will also check GitHub for future releases. When a new version is available, the update will appear on the WordPress Plugins screen just like a typical plugin update.

You can also review the plugin on GitHub to read the documentation, inspect the source code, view previous releases, and follow future revisions.

The plugin is free to use.

Lock Modified Date By Default

What the Plugin Does

When an editor opens a post, page, or supported custom post type in the WordPress block editor, the plugin waits for Rank Math’s settings to load.

Once it finds the Lock Modified Date toggle, it enables the option if it is not already enabled.

If the editor is only fixing a typo, replacing an image, or making another minor adjustment, there is nothing else to remember. They can save the page while leaving the toggle enabled.

When the editor makes a meaningful content update and wants WordPress to record a new modified date, they can turn the toggle off before saving.

The plugin does not permanently lock anything. It simply changes the default when the editor opens.

The person editing the page still has control over what happens during that save.

How to Download the Plugin From GitHub

You do not need to understand Git, use GitHub Desktop, clone a repository, or know how to work with source control. The installable plugin is provided as a normal ZIP file through the GitHub Releases system.

Step 1: Open the Latest Release

Go to the following page: https://github.com/bigredseo/brs-rank-math-modified-date-lock/releases/latest/

The word latest in that address is intentional. GitHub automatically redirects that link to the newest published release, so the article does not need a new download link every time we update the plugin.

You can also begin at the main Rank Math Modified Date Lock repository. On a desktop computer, look along the right side of the repository page for the Releases section. Select the newest release to open its download page.

Step 2: Find the Assets Section

On the release page, scroll down until you see a section labeled Assets. You may need to select or expand Assets before the individual files become visible. GitHub will normally show several downloadable files.

Look for the ZIP file with a name similar to:brs-rank-math-modified-date-lock-1.1.2.zip

The numbers at the end are the plugin version. They will change as newer versions are released.

Step 3: Download the Correct ZIP File

Select the specifically named plugin ZIP:

brs-rank-math-modified-date-lock-[version].zip

Do not choose:

  • Source code (zip)
  • Source code (tar.gz)

GitHub creates those source-code archives automatically. They are copies of the repository rather than the ZIP file we package specifically for installation through WordPress.

The file you want begins with:brs-rank-math-modified-date-lock-

After selecting the correct file, save it somewhere you can find it on your computer, such as your Downloads folder. You do not need to extract or unzip the file. WordPress needs the ZIP file as it was downloaded.

How to Install the Plugin in WordPress

Once you have downloaded the plugin ZIP, you can install it through the WordPress dashboard.

Step 1: Open the Plugin Installer

Log in to your WordPress admin area. From the left-hand menu, go to: Plugins > Add New Plugin

Depending on your WordPress version, the menu may be labeled Add New rather than Add New Plugin. Both take you to the plugin installation screen.

Step 2: Select Upload Plugin

At the top of the Add Plugins screen, select Upload Plugin.

WordPress will display an upload field and a Choose File button.

Step 3: Choose the ZIP File

Select Choose File and locate the plugin ZIP you downloaded from GitHub.

The filename should look similar to:brs-rank-math-modified-date-lock-1.1.2.zip Select the file, then choose Install Now.

WordPress will upload the ZIP, create the plugin folder, and install the included files.

Step 4: Activate the Plugin

After the installation completes, select Activate Plugin.

Rank Math SEO must already be installed and active. If Rank Math is not active, the Modified Date Lock plugin will not allow activation and will display a warning instead.

Step 5: Confirm That It Is Working

Open an existing post or page in the WordPress block editor.

Open the Rank Math panel and locate its advanced settings. The Lock Modified Date toggle should already be enabled.

There are no separate settings to configure. The plugin performs its work automatically each time a supported editing screen loads.

Why the Plugin Is Distributed Through GitHub

The Rank Math Modified Date Lock plugin is distributed through GitHub rather than the official WordPress.org plugin directory.

This is a small, single-purpose utility rather than a large plugin with a broad settings area or dozens of features. GitHub gives us a practical way to maintain the code, publish packaged releases, document changes, and make the complete source available for review without maintaining a separate WordPress.org listing.

That does not mean you need to visit GitHub every time the plugin is updated. The plugin includes its own update checker. It periodically checks the GitHub repository for a newer release and, when one is available, displays the update in the normal WordPress Plugins area.

You can then install the update through WordPress in the same way you would update most other plugins.

GitHub also gives more technical users and developers a transparent place to:

  • Review the source code
  • Read the README and installation notes
  • View previous releases
  • Review changes between versions
  • Download the newest release manually when needed

You can review the complete project on GitHub or go directly to the latest downloadable release.

What to Do If You Installed the Original Code Snippet

If you previously installed the code version from our old GitHub repository, remove or deactivate it before using the standalone plugin.

Where you need to look depends on how the original code was installed.

Check the following possible locations:

  • Your active theme or child theme’s functions.php file
  • The WPCode plugin
  • The Code Snippets plugin
  • A custom site-specific plugin
  • The wp-content/mu-plugins/ directory

The old code may include names or comments referring to Rank Math, modified dates, or brs_default_lock_rankmath_modified_date_js.

You do not need to run both versions. The standalone plugin replaces the original snippet and is easier to maintain.

If you are unsure whether the old code is still installed, have a developer check before activating the new plugin.

How to Check If This Has Been Happening on Your Site

The quickest way to review modified dates on your website is with Screaming Frog. Crawl your site and pull the modified date from Rank Math’s schema output. If you see modified dates that are more recent than you would expect on older posts, especially posts you know have only had minor edits, that is a sign the toggle has not been in use.

We wrote a separate guide on how to extract published and modified dates using Screaming Frog if you want to walk through that process.

Keep in mind that activating this plugin does not restore or calculate historical dates. It controls what happens during future edits.

If an old article already has an inaccurate modified date, you will need to review the page and decide whether that date should be corrected separately.

How the Plugin Works

The plugin only loads its editor script on supported WordPress post-editing screens. It does not load the script on the public-facing side of the website.

It first confirms that Rank Math is available and that the current screen is a block-editor post screen.

The WordPress block editor and Rank Math interface are rendered dynamically with JavaScript. Rank Math’s toggle may not be present immediately when the initial editor page loads.

The plugin uses a MutationObserver to watch for the Lock Modified Date control to appear in the editor.

Once the control is found, the plugin checks its current state. If the toggle is off, the plugin turns it on.

It then disconnects the observer so that it does not continue watching the editor or interfere with the user’s actions.

This is important because the plugin is not designed to force the option to remain locked. It sets the preferred starting position once and then gets out of the way.

If an editor turns the option off after the page loads, the plugin does not turn it back on during that editing session.

The plugin also:

  • Runs on posts, pages, and custom post types that use the block editor
  • Does nothing on the public-facing website
  • Leaves the toggle alone when it is already enabled
  • Does not directly rewrite post dates in the database
  • Does not prevent editors from updating a modified date
  • Checks that Rank Math is active
  • Can deactivate itself with an explanation if Rank Math is later deactivated

This is not an official Rank Math extension or a Rank Math API integration.

The plugin interacts with the toggle that Rank Math renders inside the block editor. If Rank Math significantly changes that portion of its editor interface, the plugin may need to be updated.

We maintain the plugin and publish revised versions through GitHub Releases. The plugin checks for those releases and displays available updates within the normal WordPress Plugins screen.

Frequently Asked Questions

Does locking the modified date hurt SEO? No. Locking it means Google sees the date the content was last meaningfully updated, which is a more accurate signal than a date that changes every time someone fixes a typo. Accurate freshness signals are better for SEO than frequent but meaningless ones. When you substantially improve an article, turn the lock off before saving so the modified date reflects the work.

Does This Prevent Google From Seeing My Changes? No. The plugin only controls whether WordPress changes the post’s stored modified date during that save. It does not hide the revised HTML, block Googlebot, add a noindex directive, prevent crawling, or stop search engines from processing the page. A typo correction or image replacement can still be discovered after Google crawls the page.

Will this affect all post types? The plugin runs on WordPress post-editing screens that use the block editor. That generally includes posts, pages, and public custom post types that support the Gutenberg editor. It may not apply to content managed through a completely separate editing interface (Elementor, DIVI, etc). The plugin does not run on the public-facing side of the website.

What Happens When I Make a Meaningful Update? Open the Rank Math settings and turn Lock Modified Date off before saving the page. WordPress can then record a new modified date for that update. The next time you open the editor, the plugin will set the toggle back to its normal locked default.

What if an editor forgets to unlock it before saving a real update? Open the post again, turn the Lock Modified Date toggle off, and save or update the page. The modified date will update on that save. The lock is not permanent.

Does this work without Rank Math? No. The plugin was created specifically for Rank Math’s Lock Modified Date feature. Rank Math SEO must be installed and active. If you deactivate Rank Math while the Modified Date Lock plugin remains active, the plugin can deactivate itself and display an admin notice explaining why.

Does It Work With the Classic Editor? No. The plugin is designed for Rank Math’s toggle inside the WordPress block editor. Sites using the Classic Editor would need a different approach to controlling modified dates.

Will It Fix Modified Dates That Are Already Wrong? No. The plugin controls future saves. It does not automatically determine which historical modified dates were accurate or restore earlier dates. You should review existing dates before changing them because an apparently recent date may represent a legitimate content update.

Can this break anything on my site? It is scoped tightly to the block editor and only interacts with a single toggle. It does not modify the database, touch post data directly, or run on the front end of your site. As with any WordPress plugin, you should still keep it updated and test it after major WordPress or Rank Math changes.

What Happens If Rank Math Changes Its Editor? The plugin finds and interacts with Rank Math’s toggle in the editor interface. If Rank Math substantially changes the toggle or its surrounding markup, the automatic behavior may stop working until the plugin is updated. That would normally mean the toggle no longer turns on automatically. It would not delete content or rewrite existing dates. The newest compatible version will be available from the GitHub Releases page.

Does the Plugin Update Automatically Through WordPress? Yes. Although the plugin is distributed through GitHub rather than the official WordPress.org plugin directory, it includes its own update checker. The plugin periodically checks GitHub for the newest published release. When an update is available, WordPress will display it on the Plugins screen along with your other plugin updates.

You can review the version details and install the update directly through WordPress. You do not need to manually download and upload every new release. You can also visit the main GitHub repository to review the README, source code, and release history, or open the latest release page to download the current ZIP manually.

Small Fixes Can Prevent Larger Problems

Most edits to an established WordPress post are not major content updates. Most saves do not deserve a new “last updated” date. And if you have a site with a lot of older content that has been ranking well, letting the modified date update freely every time someone fixes a typo is the kind of thing that quietly costs you.

This is one of those small configuration details that does not feel urgent until you realize how long it has been happening.

Big Red SEO builds and maintains WordPress websites, WooCommerce stores, and custom WordPress solutions. No outsourcing, no handoffs. When you reach out, you are talking directly to Kim or Conor.

If your site needs an SEO audit, technical cleanup, or someone to figure out why WordPress keeps doing something it should not be doing, get in touch with us at Big Red SEO.

Share this post