PHPackages                             spanjeta/yii2-install - 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. [Database &amp; ORM](/categories/database)
4. /
5. spanjeta/yii2-install

ActiveYii2-extension[Database &amp; ORM](/categories/database)

spanjeta/yii2-install
=====================

Database Installer for every Site

345PHP

Since Jul 5Pushed 9y ago1 watchersCompare

[ Source](https://github.com/spanjeta/yii2-install)[ Packagist](https://packagist.org/packages/spanjeta/yii2-install)[ RSS](/packages/spanjeta-yii2-install/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependenciesVersions (1)Used By (0)

yii2-installer
==============

[](#yii2-installer)

Database Installing functionality module extention for Yii2.

=========== Database Installer for every Site

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

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require --prefer-dist spanjeta/yii2-install "*"

```

or add

```
"spanjeta/yii2-install": "*"

```

to the require section of your `composer.json` file.

Usage
-----

[](#usage)

```

Add to modules
```php
       $config ['modules'] ['install'] = [
			'class' => 'app\modules\install\Install',
	];

```

Save your SQL file in **\_backup** folder with the name of "db\_backup.sql".

Add to web.php file

```
defined ( 'SQL_FILE_PATH' ) or define ( 'SQL_FILE_PATH', dirname ( __FILE__ ) .'/../_backup/db_backup.sql' );
defined ( 'DB_CONFIG_PATH' ) or define ( 'DB_CONFIG_PATH', dirname ( __FILE__ ) . '/config/' );
defined ( 'DB_CONFIG_FILE_PATH' ) or define ( 'DB_CONFIG_FILE_PATH', DB_CONFIG_PATH  . 'db' . '.php' );
defined ( 'DB_BACKUP_FILE_PATH' ) or define ( 'DB_BACKUP_FILE_PATH', dirname ( __FILE__ ) );
```

Pretty Url's `/install`

No pretty Url's `index.php?r=install`

```

```

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/83ebbcd3e6c1ad4376709aeb36832f57006d022293b9490030af68ad8917565a?d=identicon)[spanjeta](/maintainers/spanjeta)

---

Top Contributors

[![spanjeta](https://avatars.githubusercontent.com/u/2450836?v=4)](https://github.com/spanjeta "spanjeta (9 commits)")

### Embed Badge

![Health badge](/badges/spanjeta-yii2-install/health.svg)

```
[![Health](https://phpackages.com/badges/spanjeta-yii2-install/health.svg)](https://phpackages.com/packages/spanjeta-yii2-install)
```

###  Alternatives

[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k116.5M113](/packages/jdorn-sql-formatter)[propel/propel1

Propel is an open-source Object-Relational Mapping (ORM) for PHP5.

8351.6M87](/packages/propel-propel1)[pgvector/pgvector

pgvector support for PHP

198628.3k10](/packages/pgvector-pgvector)

PHPackages © 2026

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