Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

All notable changes to the MonoRanks WordPress plugin. The format follows [Keep a Changelog](https://keepachangelog.com/); versions follow [Semantic Versioning](https://semver.org/).

## [0.1.18] — unreleased

- After every write and undo, the plugin asks the active page caches to drop the page that changed, so the new title, description, canonical, noindex, alt text, opening paragraph or redirect shows right away instead of when the cache expires (#11). SEO fields and the opening paragraph purge the post's URL, plus the home page when the post is the static front page; alt text purges the post the image belongs to; a redirect purges its source URL; llms.txt and the AI crawler rules purge `/llms.txt` or `/robots.txt` as before.
- New caches, each through its public API and only when active: WP-Optimize (`WPO_Page_Cache::delete_cache_by_url()`, only when its page cache is on), Nginx Helper (the `$nginx_purger->purge_url()` it exposes as a global, only when purging is on), Breeze (`do_action( 'purge_post_cache', $post_id )`, posts only), Kinsta (`$kinsta_cache->kinsta_cache_purge->initiate_purge( $post_id, 'post' )`), WP Engine (`WpeCommon::purge_varnish_cache( $post_id )`) and Pantheon Advanced Page Cache (`pantheon_wp_clear_edge_paths()`). Kinsta and WP Engine have no one-URL purge, so for `/llms.txt` and `/robots.txt` they purge everything (`purge_complete_caches()`, `purge_varnish_cache()`); a redirect source that is not a post is left alone there. WP Rocket purges the home page with `rocket_clean_home()`.
- The official Cloudflare plugin still has no public function or action to purge one URL, so it is not called. Its own hook already purges a post when the opening paragraph is written (that write saves the post).
- Each successful write result has a new `cache` field: `{ "purged": ["wp-optimize"], "failed": [], "none": false }`. `none` is true when no supported cache was active. A cache that reports a failure or throws is listed in `failed`; the write itself still succeeds. Older fields are unchanged.
- New filter `monoranks_purge_urls` and action `monoranks_purged_cache` for page purges, next to the existing `monoranks_purge_file_urls` and `monoranks_purged_file_cache`.

## [0.1.17] — unreleased

- After MonoRanks writes llms.txt or the AI crawler rules, the plugin asks the active page cache to drop `/llms.txt` or `/robots.txt`, so a copy cached before the change (often a 404 from before the file existed) does not hide it from AI crawlers or from MonoRanks' own check (monoranks/monoranks#87). Supported through each plugin's public API: WP Rocket (`rocket_clean_files`), LiteSpeed Cache (`litespeed_purge_url`), W3 Total Cache (`w3tc_flush_url`), WP Super Cache (`wpsc_delete_url_cache`) and SiteGround Optimizer (`sg_cachepress_purge_cache`). The official Cloudflare plugin has no public way to purge one URL and is left alone; a CDN cache rule outside WordPress still clears only when it expires or is purged there.
Expand Down
14 changes: 14 additions & 0 deletions docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,20 @@ Same result shape as `POST /wp-json/monoranks/v1/apply`. Best-effort: the plugin

Since 0.1.14 a `content` change (or its undo) whose saved result would break a block is rolled back and comes back as `{ "ok": false, "error": "block_check_failed", "reason": "The new paragraph block does not match what the block editor would save. The post was put back as it was." }`. `reason` is a plain-language sentence meant to be shown as is; `update_failed` now carries a `reason` too.

### `cache` (since 0.1.18)

Every successful write or undo (`ok: true`) also says what the site's page caches did with the page that changed, so MonoRanks can explain a page that still shows the old version:

```json
{ "id": "chg_1", "ok": true, "previous": "", "post_id": 12, "cache": { "purged": ["wp-optimize"], "failed": [], "none": false } }
```

- `purged`: caches that were asked to drop the page. Names: `wp-rocket`, `litespeed`, `w3-total-cache`, `wp-super-cache`, `siteground`, `wp-optimize`, `nginx-helper`, `breeze`, `kinsta`, `wp-engine`, `pantheon`.
- `failed`: caches that reported a failure or threw. The write itself still succeeded.
- `none`: `true` when no supported cache was active for this change, so nothing was purged (a cache the plugin cannot reach, such as a Cloudflare cache rule, may still hold the page).
- What is purged: the post's URL for SEO fields and the opening paragraph (plus the home page when the post is the static front page); the post the image belongs to for `alt` (the change's `post_id`, else the post it was uploaded to; no `cache` field when neither is known); the source URL for `redirect`; `/llms.txt` or `/robots.txt` for `llms_txt` and `ai_bots`.
- Absent on refused changes (`ok: false`) and from plugins before 0.1.18; treat a missing field as "unknown".

Since 0.1.15 an SEO field (`seo_title`, `seo_description`, `canonical`, `noindex`) can also be refused before anything is written:

- `seo_plugin_unsupported`: an SEO plugin MonoRanks cannot write into is active (status `seo_plugin: "other"`), for example `"reason": "SEOPress is active on this site and prints its own SEO tags. MonoRanks cannot write into SEOPress yet, so nothing was changed. Make this change in SEOPress instead."`
Expand Down
4 changes: 2 additions & 2 deletions monoranks.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Description: Connects this site to MonoRanks (SEO, AEO and GEO audits): sends published content metadata and applies the fixes you approve there, with undo.
* Plugin URI: https://monoranks.com/product/wordpress/
* Author URI: https://veronalabs.com/
* Version: 0.1.17
* Version: 0.1.18
* Requires at least: 6.0
* Requires PHP: 7.4
* Author: VeronaLabs
Expand All @@ -26,7 +26,7 @@
return;
}

define( 'MONORANKS_CONNECTOR_VERSION', '0.1.17' );
define( 'MONORANKS_CONNECTOR_VERSION', '0.1.18' );
define( 'MONORANKS_CONNECTOR_FILE', __FILE__ );
// MonoRanks address used when a key is pasted by hand. The download build sets it; wp-config.php may override it.
if ( ! defined( 'MONORANKS_API_BASE' ) ) {
Expand Down
6 changes: 5 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Tags: seo, aeo, geo, ai, audit
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 0.1.17
Stable tag: 0.1.18
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -127,6 +127,10 @@ Deleting the plugin removes its settings and scheduled tasks. Deleting the websi

== Changelog ==

= 0.1.18 =
* After every fix MonoRanks writes (or undoes), the plugin clears that page from the active page cache, so the change shows right away. Adds WP-Optimize, Nginx Helper, Breeze, Kinsta, WP Engine and Pantheon to WP Rocket, LiteSpeed Cache, W3 Total Cache, WP Super Cache and SiteGround Optimizer.
* MonoRanks is told which cache was cleared, so it can tell you when a page may still show the old version.

= 0.1.17 =
* After MonoRanks writes llms.txt or the AI crawler rules, the plugin clears /llms.txt or /robots.txt from WP Rocket, LiteSpeed Cache, W3 Total Cache, WP Super Cache and SiteGround Optimizer, so an old cached copy does not hide the change.
* /llms.txt is sent with headers that tell caches not to keep it.
Expand Down
Loading
Loading