This is a WordPress must-use plugin containing constant definitions and general configuration settings used across my development environments.
First, create the must-use plugin folder inside wp-content
:
$ mkdir path/to/wordpress/wp-content/mu-plugins
To install the plugin, download the repository and copy baizman-design-mu.php
to path/to/wordpress/wp-content/mu-plugins
. Note that it must be manually updated due to the nature of must-use plugins.
Download or clone the repository and create a symbolic link to baizman-design-mu.php
:
$ ln -s path/to/repository/baizman-design-mu.php path/to/wordpress/wp-content/mu-plugins/baizman-design-mu.php
If you clone the repository, the plugin can be updated easily via git pull
.
Require the package in composer.json
:
{
"repositories": [
{
"type": "vcs",
"url": "[email protected]:baizman-design/baizman-design-mu.git"
}
],
"require-dev": {
"baizman-design/baizman-design-mu": "dev-production"
},
"scripts": {
"post-package-install": [
"$(composer config vendor-dir)/baizman-design/baizman-design-mu/bin/make-symlink.sh"
]
}
}
Install the package:
$ composer install
The post-install script will automatically create the wp-content/mu-plugins
folder, if needed, and a symbolic link to baizman-design-mu.php
.
Create a file named .baizman-design-mu.ini
in the root directory of your WordPress instance.
The plugin can forcibly disable other plugins. This is useful for plugins that should only be run in a production environment, such as backup, firewall, and caching plugins.
To disable a plugin, add the following section and key/value pairs to .baizman-design-mu.ini
:
[disabled_plugins]
plugin[] = slug1
plugin[] = slug2
...
Add a slug, one per line, to a file named .baizman-design-mu-disabled-plugins
in the root directory of your WordPress instance.
This is supported for historical reasons.
An "Autologin" link is added to the WordPress login screen right after "Lost your password?" To set the account to automatically log into, add the following section and key/value pair to .baizman-design-mu.ini
:
[autologin]
email[] = [email protected]
email[] = [email protected]
You may also visit https://domain.test/[email protected], where "[email protected]" is an email address that corresponds to an account.