• Stars
    star
    207
  • Rank 189,134 (Top 4 %)
  • Language
    PHP
  • License
    GNU General Publi...
  • Created about 11 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A composer installer for WordPress core so I can stop saying core is a wordpress-plugin type package.

WordPress Core Installer

Build Status codecov License: GPL v2 Packagist GitHub tag

A custom Composer plugin to install WordPress core outside of vendor.

This installer is meant to support a rather specific WordPress installation setup in which WordPress is installed in a subdirectory (see the WordPress codex on that subject) and in which the location of WP_CONTENT_DIR and WP_CONTENT_URL have been customized to be outside of WordPress core (see the WordPress codex on that subject). This is because composer will delete your whole wp-content directory every time it updates core if you don't separate the two. If that installation setup isn't what you are looking for, then this installer is probably not something you will want to use.

For more information on this site setup and using Composer to manage a whole WordPress site, check out @Rarst's informational website which also includes a site stack example using this package.

Usage

To set up a custom WordPress build package to use this as a custom installer, add the following to your package's composer file:

"type": "wordpress-core",
"require": {
	"johnpbloch/wordpress-core-installer": "^2.0"
}

If you need to maintain support for PHP versions lower than 5.6 (not recommended!), use ^1.0 as your version constraint in the above.

By default, this package will install a wordpress-core type package in the wordpress directory. To change this you can add the following to either your custom WordPress core type package or the root composer package:

"extra": {
	"wordpress-install-dir": "custom/path"
}

The root composer package can also declare custom paths as an object keyed by package name:

"extra": {
	"wordpress-install-dir": {
		"wordpress/wordpress": "wordpress",
		"johnpbloch/wordpress-core": "jpb-wordpress"
	}
}

License

This is licensed under the GPL version 2 or later.

Changelog

2.0.0
  • Added support for Composer v2. Special thanks to @Ayesh for the original pull request to add this support.
  • Bumped minimum required PHP version to 5.6 (same as WP). If you need to stick with an older PHP version, you're probably ok with also sticking with an older version of Composer and can continue to use ^1.0 as your version constraint.
  • Other various fixes and improvements to README, tests, etc.
1.0.0
  • Initial stable release
  • Added tests and CI
  • Support added for custom vendor directories
  • Added sanity check for overwriting sensitive directories

More Repositories

1

wordpress

A fork of WordPress with Composer support added. Branches, tags, and trunk synced from upstream every 15 minutes.
604
star
2

wordpress-core

PHP
169
star
3

wordpress-project

A starter project for a WordPress site using Composer
PHP
41
star
4

wordpress-dev

A library containing my standard development resources
PHP
34
star
5

wp-unit-test-project

A starter project for your WordPress plugin or theme unit tests
PHP
21
star
6

phpfpm-images

PHP FPM docker containers with extensions necessary for developing WordPress on a modern stack
Dockerfile
15
star
7

child-themify

WordPress plugin to create a child theme for you.
JavaScript
14
star
8

grunt-wp-readme

Use Grunt to generate WordPress plugin readme files
JavaScript
12
star
9

build-wp

A dockerized build routine for the composer-ified WordPress repository
Shell
12
star
10

decisions

Not options
PHP
10
star
11

wordpress-core-shim

PHP
6
star
12

WordPress-MultiServer-Migration

A WordPress plugin to handle multiple servers and migrating the database among them.
PHP
5
star
13

automated-wp-tests-example

A test/example of automated WordPress tests
5
star
14

wp-cli-phar

An experiment
PHP
4
star
15

PHP_Shell

A PHP library for executing shell commands in an actual shell environment.
PHP
4
star
16

image-extensions

Add an alias of a YOURLS shortlink with an image extension
PHP
3
star
17

hide-gutenberg-panel

PHP
3
star
18

composer-grunt-bridge

Composer Grunt Bridge
PHP
3
star
19

WpBehatExtension

Another take on Behat 3.0 for WordPress
PHP
3
star
20

verily

An authentication module for MicroMVC
PHP
3
star
21

quick-wp-install

PHP
3
star
22

Visual-Shortcodes

Visual shortcode representations for WordPress
JavaScript
3
star
23

WP-Money

Money Tracking with WordPress
3
star
24

MicromvcExt

Extensions Library for MicroMVC
PHP
3
star
25

loopable-query

A loopable WP_Query extension
3
star
26

Menu-Buddy

PHP
3
star
27

wordpress-composer-updater

My console application to update my WordPress fork
PHP
3
star
28

MicroTwig

Twig templates for MicroMVC Library's Views
2
star
29

De-T-Co

No more t.co!
JavaScript
2
star
30

redirects.in

A simple redirect unpacking app
PHP
2
star
31

packages

Composer Packages
HTML
2
star
32

fluent-http-api

A library for building fluent API wrapper libraries
PHP
1
star
33

jpb-yourls

A fork of Ozh Richards' Plugin
PHP
1
star
34

random-color-changer

A simple Android app that changes the screen color to a random color on touch
Java
1
star
35

pear

1
star
36

invade

PHP
1
star
37

discount-jetpack

Remove the 'new module' counter from the Jetpack menu in WordPress
PHP
1
star
38

johnpbloch.github.com

1
star
39

VIS

VIS ( Vagrant Integration System ) makes it easy for you to integrate Vagrant into any web project written in PHP. It's a new way to bootstrap local dev environments with little to no effort.
PHP
1
star