giofreitas/wordpress

Just a package that set everything you need to get WordPress running successfully with composer.

Installs: 19

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Type:metapackage

5.3.2 2020-01-16 22:02 UTC

This package is not auto-updated.

Last update: 2024-04-19 19:54:59 UTC


README

This metapackage sets up everything you need to get WordPress running successfully with composer.

giofreitas/wordpress-composer-setup will create the wp-config.php file with the necessary definitions to let WordPress to be suitable with composer. The wp-config.php is the only non-core file that surely, will be loaded either in frontend or in admin, so its a good place to setup everything we need.

Usage

To Setup a WordPress installation including wp-config.php, add the following to your package's composer file:

"require": {
    "giofreitas/wordpress": "5.2.1"
}

You can manually set the site url in extra (do not define if you want it to be dynamic through all environments):

"extra": {
    "wordpress-site-url": "localhost"
}

We can also make use of some options from johnpbloch/wordpress-core-installer and composer/installers to change some default configurations:

"extra": {
    "wordpress-install-dir": "wordpress"
    "installer-paths": {
        "wp-content/themes/{$name}/": ["type:wordpress-theme"],
        "wp-content/plugins/{$name}/": ["type:wordpress-plugin"],
        "wp-content/mu-plugins/{$name}/": ["type:wordpress-muplugin"]
    }
}