PHPackages                             amintado/yii2-module-wordpress - 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. amintado/yii2-module-wordpress

AbandonedArchivedYii2-extension[Framework](/categories/framework)

amintado/yii2-module-wordpress
==============================

wordpress CMS for Yii2 Framework

v0.1.x-dev(8y ago)7915[3 issues](https://github.com/amintado/yii2-module-wordpress/issues)GPLPHPPHP &gt;=5.6.0

Since Sep 26Pushed 8y ago3 watchersCompare

[ Source](https://github.com/amintado/yii2-module-wordpress)[ Packagist](https://packagist.org/packages/amintado/yii2-module-wordpress)[ Docs](https://github.com/amintado/yii2-module-wordpress)[ RSS](/packages/amintado-yii2-module-wordpress/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

this module is a customized WordPress module for yii2

Installed WordPress
-------------------

[](#installed-wordpress)

[![untitled](https://user-images.githubusercontent.com/11722893/30788124-a851add4-a1a3-11e7-90df-c9b94d64ab55.png)](https://user-images.githubusercontent.com/11722893/30788124-a851add4-a1a3-11e7-90df-c9b94d64ab55.png)

install
-------

[](#install)

```
$ composer require amintado/yii2-module-wordpress "*"

```

OR add this line to composer.json

```
"amintado/yii2-module-wordpress":"*"

```

Config
------

[](#config)

add

```
'cms'=>[
            'class'=> amintado\wordpress\Module::className(),
        ]

```

to frontend/config/main.php file, under modules array, for example:

```
'modules' => [
        'cms'=>[
                    'class'=> amintado\wordpress\Module::className(),
                ]
]

```

create a php file with this name in root project directory: `status.php`add this lines to `status.php`:

```
defined('YII_DEBUG') or define('YII_DEBUG', true);
defined('YII_ENV') or define('YII_ENV', 'dev');
defined('WP_USE_THEMES') or define('WP_USE_THEMES', true);

```

now delete this lines from your Yii2 app index file to prevent conflict:

```
defined('YII_DEBUG') or define('YII_DEBUG', true);
defined('YII_ENV') or define('YII_ENV', 'dev');

```

and `require(status.php)` in your app index.php file

Now Install Wordpress
---------------------

[](#now-install-wordpress)

open this link:

then module will create a folder with 'cms' name in your root project directory, and will install WordPress there.

wordpress tables will create automatic in your DB if you are using mysql by default.

after install system will redirect webpage to installed wordpress directory.

Parameters
----------

[](#parameters)

after wp installed,you can login to wp with this config:

admin username:wpadmin

admin password: 123456789

Change Parameters
-----------------

[](#change-parameters)

you can also change default parameters before install WordPress on Your project, just config this parameters in config array in config/main.php file:

```
'modules' => [
        'cms'=>[
                    'class'=> amintado\wordpress\Module::className(),
                    'WeblogTitle'=>'amintado Yii2 WordPress Module',
                    'WeblogUsername'=>'wpadmin',
                    'WeblogEmail'=>'amintado@gmail.com',
                    'WeblogPassword'=>'123456789',
                    'WeblogPublic'=>1
                ]
]

```

Notic
-----

[](#notic)

wordpress admin options and menu will disable in debug mode, for example if YII\_DEBUG=true then all wordpress admin menus and admin bars will disable.

this settings can set or unset in `function.php` file in theme folder.

if you have solution for that, tell me your solution.

License
-------

[](#license)

This Module is Under GPL3 LICENSE

Improve
-------

[](#improve)

if you want work with WP on YII2 Framework realy, this module is first created,then help to Improve it **:)**

For Persian Programmers
-----------------------

[](#for-persian-programmers)

this WordPress is contain translated and RTL wp layers slider plugin. that you can use it in your Project

use WP functions in Yii2
------------------------

[](#use-wp-functions-in-yii2)

if you want use WP functions in yii for example load a post or load an slide in your Yii2 project You must *require* **wp-load.php** file to your project.

Attention
---------

[](#attention)

Never Use wp-load.php in index.php file. use it in nedded controllers or actions only.

if you require wp-load.php file in your index.php file or any certain part of project, your CSRF validation in login,logout and every form in your site will conflict with wordpress,and your posted data will filter and will change to null.

use YII2 functions in installed WordPress
-----------------------------------------

[](#use-yii2-functions-in--installed-wordpress)

**wp-load.php** file is contain Yii2 starter php files.

you can see added codes here:

```
require (__DIR__.'/../status.php');

if (strpos(parse_url($_SERVER  ["REQUEST_URI"])['path'],'cms',0)){

require(__DIR__ . '/../vendor/autoload.php');
require(__DIR__ . '/../vendor/yiisoft/yii2/Yii.php');
require(__DIR__ . '/../common/config/bootstrap.php');
require(__DIR__ . '/../backend/config/bootstrap.php');
//require(__DIR__ . '/../cms/wp-load.php');

$config = yii\helpers\ArrayHelper::merge(
    require(__DIR__ . '/../common/config/main.php'),
    require(__DIR__ . '/../common/config/main-local.php'),
    require(__DIR__ . '/../backend/config/main.php'),
    require(__DIR__ . '/../backend/config/main-local.php')
);

(new yii\web\Application($config));

}

```

WordPress Version
-----------------

[](#wordpress-version)

the based wordpress that used in this module:

version:4.8.1 with persian full translated package

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance11

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity44

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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3147d ago

### Community

Maintainers

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

---

Top Contributors

[![yiiman-dev](https://avatars.githubusercontent.com/u/11722893?v=4)](https://github.com/yiiman-dev "yiiman-dev (14 commits)")

---

Tags

yii2amintadoyii2-wordpressYii2 wordpress module

### Embed Badge

![Health badge](/badges/amintado-yii2-module-wordpress/health.svg)

```
[![Health](https://phpackages.com/badges/amintado-yii2-module-wordpress/health.svg)](https://phpackages.com/packages/amintado-yii2-module-wordpress)
```

###  Alternatives

[yiisoft/yii2-twig

The Twig integration for the Yii framework

1431.9M32](/packages/yiisoft-yii2-twig)[yidas/yii2-bower-asset

Bower Assets for Yii 2 app provided via Composer repository

331.2M30](/packages/yidas-yii2-bower-asset)[devanych/yii2-cart

Shopping cart for Yii2

2011.2k](/packages/devanych-yii2-cart)[tecnocen/yii2-formgenerator

Yii 2 Library to configure form generator

145.7k](/packages/tecnocen-yii2-formgenerator)

PHPackages © 2026

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