2017 © Pedro Peláez
 

wordpress-muplugin domains

Domains for WordPress Multisite.

image

trendwerk/domains

Domains for WordPress Multisite.

  • Friday, December 23, 2016
  • by haroldangenent
  • Repository
  • 6 Watchers
  • 26 Stars
  • 218 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 4 Versions
  • 17 % Grown

The README.md

Domains

Domains for WordPress Multisite., (*1)

Requires WordPress 4.5+. Specifically meant for using domains on subdirectory Multisite installs., (*2)

Note: This plugin does not replace all existing URLs in the database. Therefore, it is recommended to install this immediately after creating a multisite install., (*3)

Installation

If you're using Composer to manage WordPress, add this plugin to your project's dependencies. Run:, (*4)

composer require trendwerk/domains

Setup

The basic setup of this plugin consists of two steps:, (*5)

  1. Define the correct constants in your WordPress configuration file (default: wp-config.php)
  2. Configure the .domains file, which is the main configuration file for this plugin

Constants

define('SUNRISE', true);

This activates a WordPress drop-in plugin called sunrise.php. Allows this plugin to perform actions right before Multisite is loaded., (*6)

define('CONTENT_DIR', '/app');

This is only necessary if your content folder is not located in the default /wp-content folder. The example above uses /app., (*7)

define('DOMAIN_CURRENT_SITE', 'www.example.com');

Probably not necessary to say, but this should be defined when using Multisite. This plugin relies on it being defined as well., (*8)

Omit these constants

Never define the following constants when using Multisite and this plugin:, (*9)

  • WP_CONTENT_URL - should be defined by this plugin
  • WP_HOME - not used by Multisite
  • WP_SITEURL - not used by Multisite

Configuration

The .domains file is the main configuration file for this plugin and contains all domains. It is set up in the format blogId:domain. Domain aliases can be created by separating domains by a comma. For example:, (*10)

2=www.example.com,example.com
3=www.example.org

The domains file should be located in the root of your project. This file should probably be excluded from version control, since enviroments are usually run on different domains. When using Capistrano for deployment, it should be defined as a linked file., (*11)

Note: This plugin searches for the .domains file in the folder where WordPress is located and a maximum of two folders up., (*12)

The Versions

23/12 2016

dev-master

9999999-dev

Domains for WordPress Multisite.

  Sources   Download

GPL-2.0+

The Requires

 

The Development Requires

23/12 2016

0.2.0

0.2.0.0

Domains for WordPress Multisite.

  Sources   Download

GPL-2.0+

The Requires

 

The Development Requires

05/08 2016

0.1.1

0.1.1.0

Domains for WordPress Multisite.

  Sources   Download

GPL-2.0+

The Requires

 

The Development Requires

12/05 2016

0.1.0

0.1.0.0

Domains for WordPress Multisite.

  Sources   Download

GPL-2.0+

The Requires

 

The Development Requires