2017 © Pedro Peláez
 

library composer-wordpress

WordPress managed by composer with highly customized paths (bye wp-content!)

image

jefrancomix/composer-wordpress

WordPress managed by composer with highly customized paths (bye wp-content!)

  • Friday, March 17, 2017
  • by jefrancomix
  • Repository
  • 1 Watchers
  • 1 Stars
  • 18 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

WordPress Composer Installation

Base configuration for install and deploy WordPress sites using composer, (*1)

The structure for your WordPress instalation will be:, (*2)

/.env              -> edit in this file the most common config constants
/vendor            -> You shouldn't touch anything here, 3rd party libraries
/public
/public/cms        -> the WordPress installation dir (managed by composer)
/public/index.php  -> custom WordPress bootstrap file
/public/media      -> the WordPress directory to store uploads
/public/extensions -> WordPress plugins, managed by composer
/public/must       -> WordPress must-use plugins
/public/themes     -> themes directory
/app/config/environments/{development,production,...}.php extra configuration

It uses WordPress Packagist in order to manage your plugins, themes and other php dependencies, (*3)

How to start

Step1: Instalation

Requirements: * PHP7.1 or greater, (*4)

Create your project:, (*5)

composer create-project jefrancomix/composer-wordpress your_directory_name "dev-master"

Set the WordPress permissions:, (*6)

# Configure the wp-content/uploads permissions
# https://codex.wordpress.org/Changing_File_Permissions
chmod -R 775 public/media

Step2: Configuration

Copy .env.example to .env and customize your parameters, (*7)

Configure the rest of conventional wp-config parameters

By default a file in app/config/environments/development.php is customizable, if you need to customize extra vars, you can create other files in that dir, and load its settings by changing the WP_ENV var in your custom .env file., (*8)

If the rewrite rules does not seem to work, maybe Rewrite module is not enabled, you could debug this adding this line to Apache configuration:, (*9)

# /etc/apache/apache2.conf in debian/ubuntu systems
LogLevel alert rewrite:trace6

Then restart Apache service, if the log file shows:, (*10)

Cannot find module rewrite

You must enable it in order to get permalinks working:, (*11)

# a2enmod rewrite
# service apache2 restart

This is not specific to this structure, is valid for any WordPress installation running on Apache2., (*12)

Credits

Inspired by simmetric/wordpress-composer-installation and bedrock/roots with some magic of composer installer script (mostly rewrite and copy files), (*13)

The Versions

17/03 2017

dev-master

9999999-dev

WordPress managed by composer with highly customized paths (bye wp-content!)

  Sources   Download

MIT

The Requires

 

by Jesus Franco

17/01 2017

0.1

0.1.0.0

  Sources   Download

MIT

The Requires

 

by Jesus Franco