Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/msp-products/mainwp-rankmath-noindex/archive/refs/heads/main.zipMainWP Syndicated NoIndex (formerly MainWP RankMath NoIndex)
Developed by Joshua L. Garza at My Social Practice.
When the same post is published across many client sites from the MainWP Dashboard, every copy competes in search with identical content. MainWP has no native way to noindex syndicated posts. Install this plugin on each child site, and every blog post MainWP creates there is noindexed automatically, whichever SEO plugin the site uses. Posts written on the site itself are never touched.
🔹 Features:
- Automatic detection: Blog posts created by MainWP (bulk posting and Post Plus) are marked the moment MainWP Child finishes creating them. Pages, and posts written or edited on the site, are left alone.
- Works with any SEO setup: Noindex is enforced when the page is served, through an
X-Robots-Tag: noindexheader and the robots meta tag. That covers Rank Math, Yoast SEO, SEOPress, The SEO Framework, All in One SEO, or no SEO plugin at all. Each plugin's own noindex setting is also updated, so its editor and XML sitemap agree. Marked posts are left out of the WordPress core sitemap. - Cleans up past posts: When a site first runs 2.1.0, the plugin finds blog posts MainWP created earlier (including during the period when 1.3 stopped working) and noindexes them in the background. Each change is recorded, and
wp mwpni backfill undoreverses it. - Visible: A "MainWP – noindex" label in the Posts list, and backfill progress on the Plugins screen.
- Updates from wp-admin: New versions published on GitHub appear in Dashboard → Updates and in MainWP's update list like any other plugin update.
Requirements
- WordPress 5.8 or later
- PHP 7.4 or later
- MainWP Child on the site
Installation
Download mainwp-rankmath-noindex.zip from the latest release and install it on each child site through Plugins → Add New → Upload, or through MainWP's plugin install. To replace version 1.3, use "Replace current with uploaded" or MainWP's "Overwrite existing". Version 1.3 cannot update itself.
Use the release asset, not GitHub's "Source code" download: that one unpacks to a differently named folder and includes development files.
Updates
Sites check GitHub for a new release about every 6 hours. Dashboard → Updates → "Check again" checks immediately (2.0.2 and later). Updates install in place; the plugin stays active and its folder is kept.
Backfill of past MainWP posts (2.1.0)
After installing or updating to 2.1.0, the backfill starts on the site's next request and runs in WP-Cron batches of 100 posts. It looks for blog posts that carry meta only MainWP writes: _selected_clients from bulk posts, and _mainwp_child_content_operation_v2 from Post Plus. It runs once per site.
Editing a site-authored post from the MainWP Dashboard also copies
_selected_clientsonto it, so such posts are backfilled too.
WP-CLI commands:
| Command | What it does |
|---|---|
wp mwpni backfill status |
Progress and how many posts are left |
wp mwpni backfill audit [--format=table\|csv\|json\|ids\|count] |
List the posts it would noindex; changes nothing |
wp mwpni backfill run |
Finish now instead of waiting for WP-Cron (use where WP-Cron is disabled) |
wp mwpni backfill undo --yes |
Restore every backfilled post's previous SEO settings; the backfill won't run again on its own |
To audit a site before anything changes, add define('MWPNI_BACKFILL_MANUAL', true); to wp-config.php before installing. The backfill then runs only via wp mwpni backfill run.
Developer filters
mwpni_post_types: post types that are noindexed when MainWP creates them (default:['post']).mwpni_noindex_post: override the decision for a single post ($noindex, $post_id).
Releasing (maintainers)
- Bump
Version:andMWPNI_VERSIONinmainwp-rankmath-noindex.php, plusStable tagand the changelog inmainwp-rankmath-noindex-readme.txt. - Push to
main. CI builds the zip and tests it on PHP 7.4, 8.2 and 8.3. - Tag
vX.Y.Zand push the tag. CI checks the tag matches the version, re-runs the tests, and publishes the release with the zip sites update from.
Changes to this README alone don't need a release; it is not included in the plugin zip.
Changelog
- 2.1.0: One-time backfill of posts MainWP created before the plugin could mark them, with WP-CLI
status,audit,runandundocommands, progress on the Plugins screen, and theMWPNI_BACKFILL_MANUALswitch. - 2.0.2: "Check again" on Dashboard → Updates now always checks GitHub for a new release.
- 2.0.1: Version bump to test the update path; no functional changes.
- 2.0.0: Rewrite. Detects MainWP-created posts reliably through MainWP Child's post-creation hook, enforces noindex regardless of SEO plugin, adds updates from wp-admin, and supports PHP 7.4+.
- 1.3.0: Rank Math-only noindex for MainWP bulk posts.
See mainwp-rankmath-noindex-readme.txt for full details.