ixa / wordpress-core
WordPress fork that works with Composer
Installs: 339
Dependents: 2
Suggesters: 0
Security: 0
Stars: 12
Watchers: 3
Forks: 0
Type:wordpress-core
Requires
- php: >=5.3.2
- johnpbloch/wordpress-core-installer: ~0.2
Suggests
- wp-cli/wp-cli: Allows command line interaction with WordPress `composer global require wp-cli/wp-cli
README
WordPress fork that works with Composer.
As of version 4.0, WordPress doesn't have Composer support. Using this fork you get a WordPress ready to be use as dependency in its own folder, and don't have to wait until WordPress core have built-in support.
Installation
require: {
"ixa/wordpress-core" : "~4.0"
}
If you are starting a new project, you can use Ixa WordPress Starter to get WordPress core and configuration files, running only one command
$ composer create-project ixa/wordpress-starter <project-name>
Configuration
A tipical file tree using WordPress and Composer is
+ wp-content # Defined by WP_CONTENT_DIR, WP_CONTENT_URL
+ themes
+ my-theme
+ uploads
+ plugins
+ wordpress # WordPress core
+ vendor
- wp-config.php # Main config file
- index.php # Must require './wordpress/wp-blog-header.php'
In order to run WordPress the following constants must be set in wp-config.php
(example)
WP_HOME
, URL of public area.WP_SITEURL
, URL of WordPress instalationWP_CONTENT_DIR
andWP_CONTENT_URL
, Path and url for wp-content folder.themes
andlanguages
folders must be withinwp-content
and cannot be configurable
additionally, wp-config.php
is a good place to require vendor/autoload.php
.
And finally the index file must have the following:
<?php
define('WP_USE_THEMES', true);
require('./wordpress/wp-blog-header.php');