PHPackages                             eleven-miles/mimir - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [CLI &amp; Console](/categories/cli)
4. /
5. eleven-miles/mimir

ActiveProject[CLI &amp; Console](/categories/cli)

eleven-miles/mimir
==================

A WordPress skeleton installation template with WP CLI integration for modern Wordpress development

v3.0.1(2y ago)025[1 PRs](https://github.com/thisisgain/Mimir/pulls)UnlicenseShellPHP &gt;=8.2

Since Oct 16Pushed 1mo agoCompare

[ Source](https://github.com/thisisgain/Mimir)[ Packagist](https://packagist.org/packages/eleven-miles/mimir)[ RSS](/packages/eleven-miles-mimir/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (6)Dependencies (5)Versions (47)Used By (0)

Mímir v4
========

[](#mímir-v4)

A portable bash setup script for new GAIN WordPress projects. Handles WordPress core installation, Erebus parent theme setup, child theme scaffolding, and git initialisation — all via WP-CLI.

---

Prerequisites
-------------

[](#prerequisites)

Ensure the following are available in your environment before running the script:

ToolInstallNotes[WP-CLI](https://wp-cli.org)`brew install wp-cli``wp --info` should return without errorGit`brew install git`PHP 8.2+via Valet or HomebrewMySQL / MariaDBvia Valet or DockerServer must be running before `mimir` is invokedMySQL client`brew install mysql-client`Required by WP-CLI for database operations — see note below> **MySQL client note:** WP-CLI's database commands require the `mysql` binary to be available in your PATH, even when MySQL is already running via Valet or Docker. Install the client tools with `brew install mysql-client`. Homebrew installs this as keg-only (not auto-linked), but the script handles that automatically.

---

Installation
------------

[](#installation)

Install `mimir` as a global command once, then use it for every new project:

```
curl -fsSL https://raw.githubusercontent.com/thisisgain/Mimir/main/install.sh | bash
```

This downloads `setup.sh` to `/usr/local/bin/mimir` and prompts for your password (sudo required to write there). You only need to do this once per machine.

To install a specific version:

```
curl -fsSL https://raw.githubusercontent.com/thisisgain/Mimir/main/install.sh | bash -s -- --version=4.0.0
```

### Updating

[](#updating)

To pull in the latest release:

```
mimir update-cli
```

To update to a specific version:

```
mimir update-cli --version=4.1.0
```

Both commands fetch `setup.sh` from the corresponding [GitHub release tag](https://github.com/thisisgain/Mimir/releases) and reinstall it to `/usr/local/bin/mimir`.

---

Usage
-----

[](#usage)

From an **empty directory** that will become your project root:

```
mkdir my-project && cd my-project
mimir
```

To check the currently installed version:

```
mimir version
```

### Local development (without global install)

[](#local-development-without-global-install)

If you have the repo cloned locally, you can symlink the script instead of installing a static copy — any changes you make to the repo are reflected immediately:

```
sudo ln -sf /path/to/Mimir/setup.sh /usr/local/bin/mimir
```

---

What the script does
--------------------

[](#what-the-script-does)

The interactive wizard walks through the following steps in order:

1. **Requirements check** — verifies WP-CLI, Git, and PHP are available
2. **Database configuration** — DB name, user, password, and host
3. **Site configuration** — URL, title, admin credentials
4. **WordPress core** — downloads core (`en_GB`), generates `wp-config.php`, creates the database, runs the install
5. **Theme setup** — clones Erebus as the parent theme, scaffolds a child theme with the correct `Template:` header
6. **Deploy workflow** — copies `deploy.yml` from the Mimir repo into `.github/workflows/`
7. **Git initialisation** — writes a `.gitignore`, makes the initial commit on `main`, optionally sets a remote and pushes
8. *(Placeholder)* Plugin installation
9. *(Placeholder)* Optional WP settings configuration
10. *(Placeholder)* Front-end build dependency installation

---

After setup
-----------

[](#after-setup)

Navigate into the Erebus parent theme directory and follow its README to install and run the front-end build:

```
cd wp-content/themes/erebus
# follow Erebus README
```

---

wp-config.php
-------------

[](#wp-configphp)

`wp-config.php` is intentionally excluded from version control. It should be created per-environment:

- **Local** — generated automatically by this script
- **WP Engine** — added via the WP Engine custom config panel or directly on the server

---

TODO
----

[](#todo)

The following are planned additions. Each has a placeholder stub in `setup.sh` marked with a `TODO` comment.

- **Child theme scaffold** — `setup_themes()` generates placeholder `style.css`, `functions.php`, and `index.php` files. These need updating once the Erebus child theme approach is finalised (asset enqueuing, namespace setup, any required config files).
- **Plugin installation** — `setup_plugins()` is a stub. Implement a default plugin set installed and activated via `wp plugin install  --activate`. Consider either a hardcoded list or a `plugins.json` config file for flexibility.
- **Settings configuration** — `setup_config()` is a stub. Implement optional WordPress settings (permalink structure, timezone, default post/comment settings, etc.) using `wp option update`.
- **Build dependencies** — `setup_build()` is a stub. Once the Erebus build tooling is confirmed, implement `yarn install` (and an optional initial build run) in both the parent and child theme directories.

---

Troubleshooting
---------------

[](#troubleshooting)

**`env: mysql: No such file or directory`**WP-CLI needs the `mysql` binary even when MySQL is already running. Install the client tools:

```
brew install mysql-client
```

The script adds `/opt/homebrew/opt/mysql-client/bin` to PATH automatically, so no further config is needed.

---

**`Error: Database connection error (2002) No such file or directory`**PHP is trying to connect via a Unix socket but can't find it. Use `127.0.0.1` instead of `localhost` as the DB host — this forces a TCP connection which works reliably with both Valet and Docker.

---

**`Error: WordPress files seem to already be present here`**The script is resumable — re-run `mimir` from the same directory and it will skip any steps that already completed (WP download, config, DB creation, theme setup) and continue from where it left off.

---

**Deprecation notices in WP-CLI output**The script filters PHP deprecation and notice lines from WP-CLI output automatically. If you still see them, ensure you are running the latest version of the script (`mimir --help` shows the version).

---

Contributing
------------

[](#contributing)

Branch from `main`, open a PR, and tag the GAIN dev team for review.

###  Health Score

46

—

FairBetter than 92% of packages

Maintenance60

Regular maintenance activity

Popularity6

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity88

Battle-tested with a long release history

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~44 days

Recently: every ~377 days

Total

46

Last Release

888d ago

Major Versions

0.0.1 → 1.0.02018-10-16

v1.7.0 → v2.0.02020-11-06

v2.0.1 → v3.0.02024-03-11

PHP version history (3 changes)0.0.1PHP &gt;=7.2.0

v1.3.4PHP &gt;=7.3.0

v3.0.0PHP &gt;=8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/8d165dc4e785a667b83bbbe50b3f64547e428c5c7088cb5573900b6bc106ae0c?d=identicon)[harryfinn](/maintainers/harryfinn)

![](https://www.gravatar.com/avatar/69675bbe4bb2bffa2762f30e2dc952ec90cf085a5ff9db0762d5ec9f742673c8?d=identicon)[joelouisworthington](/maintainers/joelouisworthington)

![](https://www.gravatar.com/avatar/37cd6b7d28106a8a13c337320fbcfd203eec2b4ddd31d1df0cc0989a7aa5ec58?d=identicon)[calumbutchart](/maintainers/calumbutchart)

![](https://avatars.githubusercontent.com/u/39808457?v=4)[aimeehaines](/maintainers/aimeehaines)[@aimeehaines](https://github.com/aimeehaines)

![](https://avatars.githubusercontent.com/u/163648484?v=4)[Selçuk Yüksel](/maintainers/elevenmiles)[@elevenMiles](https://github.com/elevenMiles)

---

Top Contributors

[![jezemery](https://avatars.githubusercontent.com/u/2809847?v=4)](https://github.com/jezemery "jezemery (19 commits)")[![HobbitCodes](https://avatars.githubusercontent.com/u/29715827?v=4)](https://github.com/HobbitCodes "HobbitCodes (12 commits)")[![WisemanH](https://avatars.githubusercontent.com/u/4037251?v=4)](https://github.com/WisemanH "WisemanH (11 commits)")[![harryfinn](https://avatars.githubusercontent.com/u/2940866?v=4)](https://github.com/harryfinn "harryfinn (9 commits)")[![tredmantj](https://avatars.githubusercontent.com/u/60179736?v=4)](https://github.com/tredmantj "tredmantj (4 commits)")[![dependabot-preview[bot]](https://avatars.githubusercontent.com/in/2141?v=4)](https://github.com/dependabot-preview[bot] "dependabot-preview[bot] (1 commits)")[![keefyhub](https://avatars.githubusercontent.com/u/8536452?v=4)](https://github.com/keefyhub "keefyhub (1 commits)")

### Embed Badge

![Health badge](/badges/eleven-miles-mimir/health.svg)

```
[![Health](https://phpackages.com/badges/eleven-miles-mimir/health.svg)](https://phpackages.com/packages/eleven-miles-mimir)
```

###  Alternatives

[phpro/grumphp

A composer plugin that enables source code quality checks.

4.3k17.0M1.1k](/packages/phpro-grumphp)[jolicode/castor

A lightweight and modern task runner. Automate everything. In PHP.

55344.7k5](/packages/jolicode-castor)[shopware/platform

The Shopware e-commerce core

3.4k1.5M3](/packages/shopware-platform)[leantime/leantime

Open source project management system for non-project managers. Simple like Trello, powerful like Jira. Built with neurodiversity in mind.

11.3k4.0k](/packages/leantime-leantime)[kimai/kimai

Kimai - Time Tracking

4.8k9.4k1](/packages/kimai-kimai)[jason-munro/cypht

Lightweight Open Source webmail written in PHP and JavaScript

1.7k160.6k](/packages/jason-munro-cypht)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
