PHPackages                             shineunited/wordpress-installer - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. shineunited/wordpress-installer

ActiveComposer-plugin[Utility &amp; Helpers](/categories/utility)

shineunited/wordpress-installer
===============================

Conductor based WordPress installer.

1.0.0(3y ago)05.5k4MITPHPPHP &gt;=8.0

Since Nov 16Pushed 3y ago3 watchersCompare

[ Source](https://github.com/shineunited/wordpress-installer)[ Packagist](https://packagist.org/packages/shineunited/wordpress-installer)[ RSS](/packages/shineunited-wordpress-installer/feed)WikiDiscussions main Synced 3w ago

READMEChangelogDependencies (14)Versions (13)Used By (4)

shineunited/wordpress-installer
===============================

[](#shineunitedwordpress-installer)

[![License](https://camo.githubusercontent.com/b117f71b4f83463e909dea31d7ddd468ff3c4404df90930aa9471f5a389e3754/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f7368696e65756e697465642f776f726470726573732d696e7374616c6c6572)](https://github.com/shineunited/wordpress-installer/blob/main/LICENSE)[![Latest Version](https://camo.githubusercontent.com/e5160a2cee7efc9d968ad739562a2fee7a1361605d93d16f466889789ecc1aa1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7368696e65756e697465642f776f726470726573732d696e7374616c6c65723f6c6162656c3d6c6174657374)](https://packagist.org/packages/shineunited/wordpress-installer/)[![PHP Version](https://camo.githubusercontent.com/ee2981ed497738500f8e94515e0154abdf218d055b930b13ea52742b70e28d63/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646570656e64656e63792d762f7368696e65756e697465642f776f726470726573732d696e7374616c6c65722f7068703f6c6162656c3d706870)](https://www.php.net/releases/index.php)[![Main Status](https://camo.githubusercontent.com/c2dfe2f1ab20af777a87f88f313ecbabf7237a80bc4599419904246ef3427b18/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f7368696e65756e697465642f776f726470726573732d696e7374616c6c65722f4275696c642f6d61696e3f6c6162656c3d6d61696e)](https://github.com/shineunited/wordpress-installer/actions/workflows/build.yml?query=branch%3Amain)[![Release Status](https://camo.githubusercontent.com/7f2834aeaba240c9d339ca8d901450e07d3955ced966261dfd5bbfaf36c5ff25/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f7368696e65756e697465642f776f726470726573732d696e7374616c6c65722f4275696c642f72656c656173653f6c6162656c3d72656c65617365)](https://github.com/shineunited/wordpress-installer/actions/workflows/build.yml?query=branch%3Arelease)[![Develop Status](https://camo.githubusercontent.com/ec83139cacab6932dad2415052143518301800282282c9d270246d3161ff2ef2/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f7368696e65756e697465642f776f726470726573732d696e7374616c6c65722f4275696c642f646576656c6f703f6c6162656c3d646576656c6f70)](https://github.com/shineunited/wordpress-installer/actions/workflows/build.yml?query=branch%3Adevelop)

Description
-----------

[](#description)

A WordPress installer built with Conductor.

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

[](#installation)

to add wordpress-installer, the recommended method is via composer.

```
$ composer require shineunited/wordpress-installer
```

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

[](#configuration)

The wordpress installer uses the Conductor configuration framework to parse parameters in the 'extra' section of the project's composer.json file.

### Parameters

[](#parameters)

#### Configurable Parameters

[](#configurable-parameters)

The following parameters can be defined in the 'extra' section of the composer.json file.

###### wordpress.webroot

[](#wordpresswebroot)

(path) Path to the webroot directory. Defaults to 'web'.

###### wordpress.home-dir

[](#wordpresshome-dir)

(path) Path to wordpress home directory, used to define WP\_HOME and WP\_SITEURL. Must be within the webroot. Defaults to '{$wordpress.webroot}'.

###### wordpress.install-dir

[](#wordpressinstall-dir)

(path) Path to the wordpress installation directory. Must be within the home-dir. Defaults to '{$wordpress.home-dir}/wp'.

###### wordpress.config-dir

[](#wordpressconfig-dir)

(path) Path to the deployments configuration directory. Must be outside of the webroot. Defaults to 'cfg'.

###### wordpress.content-dir

[](#wordpresscontent-dir)

(path) Path to wordpress content directory. Must be inside the home-dir but outside of the install-dir. Defaults to '{$wordpress.home-dir}/app'.

###### wordpress.config.convert-bool

[](#wordpressconfigconvert-bool)

(boolean) If true boolean environment configuration variables will automatically be converted. Defaults to true.

###### wordpress.config.convert-null

[](#wordpressconfigconvert-null)

(boolean) If true null environment configuration variables will automatically be converted. Defaults to true.

###### wordpress.config.convert-int

[](#wordpressconfigconvert-int)

(boolean) If true integer environment configuration variables will automatically be converted. Defaults to true.

###### wordpress.config.strip-quotes

[](#wordpressconfigstrip-quotes)

(boolean) If true string environment configuration variables will automatically have quotes stripped from them if found. Defaults to true.

###### wordpress.config.source

[](#wordpressconfigsource)

(select) Must be one of 'env', 'server', or 'local'. Defines where environment configuration variables come from. Defaults to false (none).

- 'env' - pull from $\_ENV
- 'server' - pull from $\_SERVER
- 'local' - use getenv() with local flag
- (none) - use getenv()

###### wordpress.config.default-env

[](#wordpressconfigdefault-env)

(select) Defines the default environment name, used if environment is not defined explicitly elsewhere. Must be 'production', 'staging', or 'development'. Defaults to 'production'.

#### Calculated Parameters

[](#calculated-parameters)

The following parameters are available for use but cannot be overridden in the project's composer.json file.

###### wordpress.wpconfig-dir

[](#wordpresswpconfig-dir)

(path) Path to directory where the wp-config.php file will be created. Locked to the directory above the install-dir.

###### wordpress.muplugins-dir

[](#wordpressmuplugins-dir)

(path) Path to the wordpress mu-plugins directory. Locked to '{$wordpress.content-dir}/mu-plugins'.

###### wordpress.plugins-dir

[](#wordpressplugins-dir)

(path) Path to the wordpress plugins directory. Locked to '{$wordpress.content-dir}/plugins'.

###### wordpress.themes-dir

[](#wordpressthemes-dir)

(path) Path to the wordpress themes directory. Locked to '{$wordpress.content-dir}/themes'.

###### wordpress.uploads-dir

[](#wordpressuploads-dir)

(path) Path to the wordpress uploads directory. Locked to '{$wordpress.content-dir}/uploads'.

###### wordpress.upgrade-dir

[](#wordpressupgrade-dir)

(path) Path to the wordpress upgrade directory. Locked to '{$wordpress.content-dir}/upgrade'.

### Example

[](#example)

```
{
	"name": "example/project",
	"type": "project",
	"extra": {
		"wordpress": {
			"webroot": "web",
			"install-dir": "web/wp",
			"content-dir": "web/app",
			"config-dir": "cfg",
			"config": {
				"source": "server",
				"default-env": "production"
			}
		}
	}
}
```

Usage
-----

[](#usage)

### ExtensionProvider Capability

[](#extensionprovider-capability)

Extensions to the WordPress configuration can be added via the ExtensionProvider capability by composer plugins.

#### Example Plugin

[](#example-plugin)

The plugin must implement Capable and provide the ExtensionProvider capability.

```
