ixa/wordpress-core

WordPress fork that works with Composer

4.4.4 2016-08-04 22:09 UTC

This package is not auto-updated.

Last update: 2024-12-21 20:52:02 UTC


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 instalation
  • WP_CONTENT_DIR and WP_CONTENT_URL, Path and url for wp-content folder. themes and languages folders must be within wp-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');