webtimeless

Local mode

Keep a local copy away from real people: mail to Mailpit, noindex, a Local label, logins from this computer only and blocked hosts.

File
wp-content/mu-plugins/devmagic-panel-local.php
Turned on
For new sites, or by you on a site's page or in Aura
In git
Never, it is in .git/info/exclude
On this page

A local copy of a site still has its real users, its forms and its plugins that send mail. Local mode keeps all of that on this machine.

It is one small file, wp-content/mu-plugins/devmagic-panel-local.php. It does nothing when the site's address is not a local name, so a copy pushed by mistake to a real server stays inert.

What it does

  • Mail goes to Mailpit (127.0.0.1:1025), tagged with the site, so the Mail page shows each site's mail on its own. Nothing reaches a real inbox.
  • Search engines are told not to index the site.
  • A Local label shows after the site name in the admin bar, so you always know which copy you are in.
  • Logins work from this computer only. Apache answers on every network address, so a simple local password must not work from another machine.
  • Requests to mail APIs and any hosts you add are blocked, set on the site's page.
  • wp-admin installs and updates plugins without FTP details (FS_METHOD direct, when wp-config.php sets none).
  • A theme kept in a folder of its repo is found. Each such repo in wp-content/repos becomes one more themes folder for WordPress, so the theme shows under the name production's database has (see Install a project).
  • On a network, a long My Sites menu fits the window and scrolls, with a filter once it lists 10 sites.
  • For vhosts made by hand, missing uploads load from production, so the site works without copying the whole uploads folder.

Turning it on

New sites get Local mode when they are installed. Existing sites get it when you turn it on: on the site's page, or as a fix on the Aura page, which lists every site that runs without it. It is never added to a site silently.

Your repository stays clean

The file is listed in the repo's local .git/info/exclude, never in .gitignore, so it never shows up in git status and never gets committed. The panel writes nothing of its own into a repo.

When mail does not arrive

Local mode sends mail to Mailpit, so Mailpit has to run. Install or start it on the Services or Mail page, then read the mail on the Mail page.

Checked against devmagic-panel 1.67.0.

Type to search the docs, guides, comparisons and tool pages.