composer require aubreypwd/wp-config-common
Then, add to your wp-config.php
:
if ( file_exists( __DIR__ . '/vendor/autoload.php' ) ) {
require_once __DIR__ . '/vendor/autoload.php';
}
You must define this before you require autoload.php
above!
define( 'WP_CONFIG_COMMON', 'max-execution-3600, multisite, spatie-ray, tunnel, noemail, mailhog' );
Simply tries to set max_execution_time
to one hour (for debugging, etc).
Use this before multisite
if you have not installed multisite into the database yet. After turning this on, head to /wp-admin/network.php
and install multisite. When done, you can use multisite
to turn multisite on and off again easily.
- If you don't specify
SUBDOMAIN_INSTALL
we assumefalse
for you. - If you don't specify
DOMAIN_CURRENT_SITE
, we assume$_SERVER['HTTP_HOST']
Configures multisite (note use install-multisite
first.
Pushes all Warnings and Errors from PHP to Spatie Ray(tm).
Set define( 'SPATIE_RAY_NO_WARNINGS', true )'
to stop warnings.
Set define( 'SPATIE_RAY_NO_ERRORS', true )'
to stop errors.
Tries to automatically trick WordPress into thinking the website (single-site only, the the way) is the proxy. Works with localtunnel
and ngrock
.
Stops wp_mail
from working by overriding the function. You can define WP_MAIL_RETURN
with the overridden function's return value, which is false
by default.
Forwards all email to Mailhog at localhost
(change with MAILHOG_HOST
) on Port 1025
(change with MAILHOG_PORT
).
You can also use MAILHOG_FROM_EMAIL
, MAILHOG_FROM_NAME
, and MAILHOG_AUTH
, to further configure.
Note, will override no-email
. Works by overriding wp_mail()
.