WP Manifestindependent plugin directory
manifest / multisite / dark-matter

Dark Matter Plugin WP Registry grade A. No security issues foundWP RegistryNo security issues foundOpen the reportA

A highly opinionated domain mapping plugin for WordPress Networks

★ 10stars
217release downloads
2.5.3latest · 1mo ago

Install

Download dark-matter-2.5.3.zip From the 2.5.3 release on GitHub, Sep 1, 2026

Upload it under Plugins → Add New Plugin → Upload Plugin, then activate.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/cameronterry/dark-matter/releases/download/2.5.3/dark-matter-2.5.3.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

Dark Matter is a highly opinionated domain mapping plugin for WordPress Networks, designed to work out of the box as-is with no setup. Unlike other plugins such as Donncha's "WordPress MU Domain Mapping" and WPMU Dev's premium domain mapping plugin, Dark Matter offers virtually no options beyond mapping individual domains.

Constants

Set Media Domains

Media Domains can be setup through the CLI commands on a per site basis, or setup for all sites on a Multisite using a constant. The constant can support one or more domains.

define( 'DM_NETWORK_MEDIA', [
    'media1.example.com',
    /** 'media2.example.com', */
    /** 'media3.example.com', */
] );

CLI Commands

Add / Update / Remove Domains

Examples of adding, removing and updating a domain for a Site.

wp --url="sites.my.com/siteone" darkmatter domain add www.example.com --primary --https
wp --url="sites.my.com/siteone" darkmatter domain remove www.example.com
wp --url="sites.my.com/siteone" darkmatter domain remove www.example.com --force
wp --url="sites.my.com/siteone" darkmatter domain set www.example.com --primary
wp --url="sites.my.com/siteone" darkmatter domain set www.example.com --secondary

Add / Update / Remove Media Domains

Set a media domain for a site.

wp --url="sites.my.com/sitefifteen" darkmatter domain add example.mycdn.com --type=media

Convert a secondary domain into a media domain. Useful for when repurposing an old domain for use a CDN for media assets.

wp --url="sites.my.com/siteone" darkmatter domain set example.mycdn.com --type=media

Convert a Media domain to a main domain. This is useful in scenarios when a media domain is redundant and to ensure it redirects to the website.

wp --url="sites.my.com/siteone" darkmatter domain set secondarydomain.com --type=main --secondary

Listing Domains

Examples of listing domains for a Site.

wp --url="sites.my.com/siteone" darkmatter domain list
wp --url="sites.my.com/siteone" darkmatter domain list --format=json

Examples of listing domains for the entire Network.

wp darkmatter domain list
wp darkmatter domain list --format=csv

Retrieve all the primary domains for the Network.

wp darkmatter domain list --primary

Reserving Domains

Reserving a domain. This allows an administrator to setup the primary and / or secondary domains but stop Dark Matter performing redirects and rewrites. Please note; domains are enabled by default.

wp --url="sites.my.com/siteone" darkmatter domain add www.example.com --primary --https --disable
wp --url="sites.my.com/siteone" darkmatter domain set www.example.com --enable
wp --url="sites.my.com/siteone" darkmatter domain set www.example.com --disable

Restricting Domains

Examples of adding and removing a restricted domains for a Network. This permits administrators to stop domains from being used for a WordPress website; useful for organisations which use multiple CMS.

wp darkmatter restrict add www.example.com
wp darkmatter restrict remove www.example.com

Examples of retrieving a list of all restricted domains for a Network.

wp darkmatter restrict list
wp darkmatter restrict list --format=json
wp darkmatter restrict list --format=ids

Reporting problems

You can use the Issues system here on Github to report problems with the Dark Matter plugin. To aid and speed-up diagnosing the problem, you are best to include as much as the following as you possibly can;

  • Check here to ensure the problem has not been reported by someone else.
  • WordPress;
    • Version of WordPress itself.
    • List of active plugins (installed but unused should rarely cause problems)
  • Hosting information;
    • Either
      • Apache / Nginx
      • Operating System (Linux or Windows)
    • Or;
      • Host provider (Digital Ocean, Dreamhosts, GoDaddy, WP Engine, etc)
  • Browser (Chrome, IE, Firefox, Opera, etc with version)
  • Any additional information such as;
    • Using Cloudflare.

All issues reported are taken seriously and are checked, but please bear in mind that responses are not always instant.

Syntax

Dark Matter does not have a coding style guide but there are several rules which should be observed;

  • Unix line breaks.
  • Tabs, not spaces.
  • Yoda conditions.
  • Code should be concise rather than terse.
  • Comments should not extend beyond the 80th character (default in Atom) unless;
    • Text for a bullet point.
    • Code example in comments.
    • PHPDoc conventions for @@link or @@param in describing a class or function.

URLs to check

The following is a list of example URLs which are worth checking (depending on the change) when developing with Dark Matter.

Using www.wpnetwork.com as the "Admin domain" and www.example.com as the "Primary domain", Dark Matter should be tested with the following URLs;

Development

Prerequisites

To develop with Dark Matter plugin requires the following to be installed.

  • Composer 2.0+
  • Node 16.13+
  • PHP 7.0+
  • WordPress 5.9+

For a developer environment, Dark Matter plugin is most commonly built with VVV. However this is not a hard requirement and any WordPress development environment should work without any complications.

Initial Setup

If you have NVM installed, then you can ensure the most recent compatible version of Node is installed and ready for use.

nvm use

And then you can run the following:

npm run start

This NPM script will do the following:

  • Install all Composer dependencies, including dev dependencies.
  • Install all NPM dependencies, including dev dependencies.
  • Build both the production and developer scripts.

After this point, the plugin is ready for use with your local WordPress installation.

Unit Tests

Use the following command to setup PHPUnit and the WordPress environment for it.

composer run test-setup

After the setup has completed successfully, then the following command can be used to run the unit tests.

composer run test

Releases

Newest 25 of 46 recorded releases. Each count is every asset in that release; expand a row for the breakdown.

Tag
Published
Assets
Downloads
2.5.3 latest
Sep 1, 2026 1mo ago
dark-matter-2.5.3.zip
2
May 17, 2026 5mo ago
tag only
—
Dec 9, 2025 10mo ago
dark-matter-2.5.1.zip
2
Aug 25, 2025 1 year ago
dark-matter-2.5.0.zip
11
May 26, 2025 1 year ago
dark-matter-2.4.0.zip
2
Dec 18, 2022 3 years ago
dark-matter-2.3.4.zip
14
Oct 29, 2022 3 years ago
dark-matter-2.3.3.zip
8
May 16, 2022 4 years ago
dark-matter-2.3.2.zip
7
May 14, 2022 4 years ago
dark-matter-2.3.1.zip
7
May 4, 2022 4 years ago
dark-matter-2.3.0.zip
9
Apr 10, 2022 4 years ago
dark-matter-2.2.3.zip
8
Feb 5, 2022 4 years ago
tag only
—
Jan 10, 2022 4 years ago
dark-matter-2.2.1.zip
9
Jan 9, 2022 4 years ago
dark-matter-2.2.0.zip
7
Dec 27, 2021 4 years ago
dark-matter-2.1.9.zip
13
Dec 26, 2021 4 years ago
tag only
—
Jul 24, 2021 5 years ago
dark-matter-2.1.7.zip
8
Jun 6, 2021 5 years ago
dark-matter-2.1.6.zip
11
May 20, 2021 5 years ago
dark-matter-2.1.5.zip
10
May 16, 2021 5 years ago
dark-matter-2.1.4.zip
10
Apr 18, 2021 5 years ago
dark-matter-2.1.3.zip
9
Nov 26, 2020 5 years ago
dark-matter-2.1.2.zip
12
Aug 1, 2020 6 years ago
dark-matter-2.1.1.zip
13
Jun 20, 2020 6 years ago
dark-matter-2.1.0.zip
14
Dec 15, 2019 6 years ago
dark-matter-build.zip
10
All releases on GitHub →
A grade

Security

Dark Matter Plugin 2.5.3 · audited by WP Registry

No security issues found.

Audited release
2.5.3
Findings
none
Worst severity
—
Content hash
57bdccd4f611cbdebf9e043b…

WP Registry hashes the installable build and reports on that exact bytes-for-bytes copy. Embargoed findings are withheld until they are disclosed, so a clean verdict means nothing public is outstanding. WP Manifest does not audit code itself.