PHPackages                             cottacush/yii2-base-project - 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. cottacush/yii2-base-project

ActiveProject[Framework](/categories/framework)

cottacush/yii2-base-project
===========================

A Yii 2 Base Project Template

2.0.0(5y ago)763MITPHP ~8.0

Since Jun 20Compare

[ Source](https://github.com/CottaCush/yii2-base-project)[ Packagist](https://packagist.org/packages/cottacush/yii2-base-project)[ RSS](/packages/cottacush-yii2-base-project/feed)WikiDiscussions Synced today

READMEChangelog (10)Dependencies (20)Versions (17)Used By (0)

Yii2 Base Project
=================

[](#yii2-base-project)

> A Yii 2 Base Project Template

[![Latest Stable Version](https://camo.githubusercontent.com/0c2fef72303c5c8755ac3d05419e19a8e44c926ce5b2e8d8c66f63990da9ae5f/68747470733a2f2f706f7365722e707567782e6f72672f636f747461637573682f796969322d626173652d70726f6a6563742f762f737461626c65)](https://packagist.org/packages/cottacush/yii2-base-project)[![Total Downloads](https://camo.githubusercontent.com/e056eedd9cc6e8dcc5beecc311765d1c9171d180bcb749360497221eedac423a/68747470733a2f2f706f7365722e707567782e6f72672f636f747461637573682f796969322d626173652d70726f6a6563742f646f776e6c6f616473)](https://packagist.org/packages/cottacush/yii2-base-project)[![License](https://camo.githubusercontent.com/f6c09fe4808414cca1687fe0f0cdfb060aaee64d844b917ad6b9e25a7c31957a/68747470733a2f2f706f7365722e707567782e6f72672f636f747461637573682f796969322d626173652d70726f6a6563742f6c6963656e7365)](https://packagist.org/packages/cottacush/yii2-base-project)

**Features**

- [Yii framework](http://www.yiiframework.com/) as the PHP MVC framework.
- Security - It sets some headers that projects applications against click-jacking and XSS.
- Assets version - This fixes issue with updates to js and css files and cached browser files.
- New Relic - Ensures that the proper routes show up in the new relic monitoring dashboard.
- Continuous Integration - Sample ant build.xml file that can be easily modified.

Requirements
------------

[](#requirements)

The minimum requirement by this project template that your Web server supports PHP 8.0.

### Install via Composer

[](#install-via-composer)

If you do not have [Composer](http://getcomposer.org/), you may install it by following the instructions at [getcomposer.org](http://getcomposer.org/doc/00-intro.md#installation-nix).

You can then install this project template using the following command:

```
composer global require "fxp/composer-asset-plugin:~1.4"
composer create-project --prefer-dist cottacush/yii2-base-project new_project

```

Virtual Host Setup
------------------

[](#virtual-host-setup)

*Windows*[Link 1](http://foundationphp.com/tutorials/apache_vhosts.php)[Link 2](https://www.kristengrote.com/blog/articles/how-to-set-up-virtual-hosts-using-wamp)

*Mac*[Link 1](http://coolestguidesontheplanet.com/set-virtual-hosts-apache-mac-osx-10-9-mavericks-osx-10-8-mountain-lion/)[Link 2](http://coolestguidesontheplanet.com/set-virtual-hosts-apache-mac-osx-10-10-yosemite/)

*Debian Linux*[Link 1](https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-ubuntu-14-04-lts)[Link 2](http://www.unixmen.com/setup-apache-virtual-hosts-on-ubuntu-15-04/)

Sample Virtual Host Config for Apache

```

    ServerAdmin admin@example.com
    DocumentRoot "/yii2-base-project/app/web"
    ServerName local.yii2-base-template.com

       AllowOverride all
       Options -MultiViews
      Require all granted

```

Build
-----

[](#build)

Dependencies

- [Ant](http://ant.apache.org/)

Run build

```
ant

```

Environment Variables
---------------------

[](#environment-variables)

Make a copy of `.env.sample` to `.env` in the env directory.

Docker
------

[](#docker)

This project is dockerized using the LEMP stack. The stack consists of:

- PHP 8
- nginx

Inspired by [yii2-dockerized](https://github.com/codemix/yii2-dockerized/blob/master/Dockerfile)

### Installation

[](#installation)

[Mac](https://www.docker.com/docker-mac)[Windows](https://www.docker.com/docker-windows)[Ubuntu](https://www.docker.com/docker-ubuntu)

### Running Containers

[](#running-containers)

- Ensure docker is running
- Change directory to project directory
- Run the command `docker-compose up`
- To rebuild the containers after updates to docker config files, run `docker-compose up --build`

### Entering Container CLI

[](#entering-container-cli)

- Run the command `docker ps`
- Check the Container ID for container with image ending with "\_web"
- Run the command `docker exec -it [container_id] bash`

Change log
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- Adegoke Obasa
- [All Contributors](https://github.com/CottaCush/yii2-base-template/graphs/contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity76

Established project with proven stability

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

Recently: every ~408 days

Total

9

Last Release

1943d ago

Major Versions

1.6.0 → 2.0.02021-03-05

PHP version history (4 changes)1.0.0PHP &gt;=5.5.0

1.5.0PHP ~5.5.0|~7.0

1.6.0PHP ~5.5|~7.0

2.0.0PHP ~8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/18262744?v=4)[Cotta &amp; Cush Limited](/maintainers/cottacush)[@CottaCush](https://github.com/CottaCush)

![](https://avatars.githubusercontent.com/u/4976201?v=4)[Goke Obasa](/maintainers/goke-epapa)[@goke-epapa](https://github.com/goke-epapa)

---

Tags

frameworkyii2improvedproject templatebasic

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/cottacush-yii2-base-project/health.svg)

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

###  Alternatives

[yii2mod/base

Base application template for Yii2

531.3k](/packages/yii2mod-base)

PHPackages © 2026

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