PHPackages                             tj-digital/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. [Framework](/categories/framework)
4. /
5. tj-digital/mimir

ActiveProject[Framework](/categories/framework)

tj-digital/mimir
================

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

v3.0.1(2y ago)037[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/tj-digital/mimir)[ RSS](/packages/tj-digital-mimir/feed)WikiDiscussions main Synced today

READMEChangelog (6)Dependencies (5)Versions (46)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

45

—

FairBetter than 91% of packages

Maintenance60

Regular maintenance activity

Popularity7

Limited adoption so far

Community12

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 ~45 days

Recently: every ~377 days

Total

45

Last Release

889d ago

Major Versions

0.0.1 → 1.0.12018-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)

---

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/tj-digital-mimir/health.svg)

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

###  Alternatives

[shopware/platform

The Shopware e-commerce core

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

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.2k19.7k](/packages/prestashop-prestashop)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.8M672](/packages/shopware-core)[oro/platform

Business Application Platform (BAP)

645146.3k118](/packages/oro-platform)[pimcore/skeleton

127202.6k](/packages/pimcore-skeleton)[sulu/skeleton

Project template for starting your new project based on the Sulu content management system

29736.0k](/packages/sulu-skeleton)

PHPackages © 2026

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