PHPackages                             mikehaertl/yii2-base-app - 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. mikehaertl/yii2-base-app

ActiveProject[Framework](/categories/framework)

mikehaertl/yii2-base-app
========================

A Yii 2 Application Template For Purists

1.0.2(11y ago)2622MITPHPPHP &gt;=5.4.0

Since Nov 3Pushed 11y ago4 watchersCompare

[ Source](https://github.com/mikehaertl/yii2-base-app)[ Packagist](https://packagist.org/packages/mikehaertl/yii2-base-app)[ RSS](/packages/mikehaertl-yii2-base-app/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (5)Versions (4)Used By (0)

Yii 2 Base App for Purists
==========================

[](#yii-2-base-app-for-purists)

Features
--------

[](#features)

The main tenet of this template is: Keep it simple! The idea was to only include the absolutely necessary features - and optimize some of the configuration issues of the original Yii2 base template.

- Very flat configuration file structure
- Provide local configuration files that won't get committed
- Move `YII_DEBUG` and `YII_ENV` to configuration files
- SiteController with login, logout, signup and password forget actions

Configuration
-------------

[](#configuration)

All configuration lives in 4 (or 5) files in the `config/` directory.

- `web.php` configuration of the web app
- `local.php` local overrides to the web config. **This file is not committed.**
- `console.php` configuration of the console. Here you can reuse parts of the merged `web.php` and `local.php` configuration. See the example file for how this works.
- `params.php` application parameters for both web and console application
- `console-local.php` an optional file with local overrides to the console configuration. **This file is not committed.**

Workflow
--------

[](#workflow)

Before you can create new applications on a host, you first have to install the composer asset plugin:

```
composer global require "fxp/composer-asset-plugin:1.0.0-beta2"

```

To create a new application you will usually follow this workflow:

1. Install the template with `composer create-project --prefer-dist --stability=dev mikehaertl/yii2-base-app .`
2. Add optional dependencies to `composer.json` and run `composer update`
3. Add local configuration to `config/local.php` (DB, etc.)
4. Check `config/params.php`, `config/web.php` and `config/console.php` and add project wide configuration
5. Check `migrations/m140328_144900_init` to suit your user table schema.
6. Check the models in `models/` and add/remove attributes.
7. Run migrations with `yii migrate`

This should get you started. Your app should now run in a base version and is ready to be committed to your project repository.

> Note: After the `composer create-command` step a unique cookie validation key is automatically generated and added to `config/local.php` for you.

> Note 2: `composer update` above may fail with an error about github rate limit exceeded. Have a look [here](https://getcomposer.org/doc/articles/troubleshooting.md#api-rate-limit-and-oauth-tokens)for how to resolve this issue.

Development
-----------

[](#development)

To keep this template updated with the latest package version, we should run `composer update`from time to time and then commit `composer.lock`.

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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

Total

3

Last Release

4141d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ed4cc6f6e2a51bf286f02ad0def4ee6736be32aea75bfdcd43047696cec56869?d=identicon)[mike](/maintainers/mike)

---

Top Contributors

[![mikehaertl](https://avatars.githubusercontent.com/u/675062?v=4)](https://github.com/mikehaertl "mikehaertl (27 commits)")

---

Tags

frameworkyii2application template

### Embed Badge

![Health badge](/badges/mikehaertl-yii2-base-app/health.svg)

```
[![Health](https://phpackages.com/badges/mikehaertl-yii2-base-app/health.svg)](https://phpackages.com/packages/mikehaertl-yii2-base-app)
```

###  Alternatives

[nenad/yii2-advanced-template

Improved Yii 2 Advanced Application Template By Nenad Zivkovic

9111.1k](/packages/nenad-yii2-advanced-template)[skeeks/cms

SkeekS CMS — control panel and tools based on php framework Yii2

13725.7k53](/packages/skeeks-cms)[funson86/yii2-adminlte

Yii 2 Advanced Application Template with Adminlte Theme

1492.2k](/packages/funson86-yii2-adminlte)[nenad/yii2-basic-template

Improved Yii 2 Basic Application Template By Nenad Zivkovic

466.5k](/packages/nenad-yii2-basic-template)[kartik-v/yii2-app-practical

Yii 2 Practical Application Template

672.7k](/packages/kartik-v-yii2-app-practical)[kartik-v/yii2-app-practical-a

Yii 2 Practical A Application Template

363.7k](/packages/kartik-v-yii2-app-practical-a)

PHPackages © 2026

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