Skip to main content
Version: 1.x

Environmental Variables

This document describes the environmental variables that are used within the testing framework and their purpose. Most variables are used during installation and can be configured using methods on the Installation Manager.

VariableDescription
CACHEDIRThe directory used when downloading WordPress, WordPress plugins, and checking WordPress versions during testing. Defaults to /tmp.
DISABLE_WP_UNIT_TEST_CASE_SHIMDisable the loading of a shim-version of WP_UnitTestCase that is used to support transitioning to Mantle Testkit.
MANTLE_CI_BRANCHThe branch of the Mantle CI repository to use when installing WordPress.
MANTLE_EXPERIMENTAL_TESTING_USE_HOME_URL_HOSTSee documentation.
MANTLE_INSTALL_OBJECT_CACHEObject cache to install during testing. See documentation.
MANTLE_INSTALL_VIP_MU_PLUGINSInstall VIP MU plugins during testing. See documentation.
MANTLE_LOAD_VIP_CONFIGOverride to disable the loading of a vip-config/vip-config.php file in the wp-config.php. Defaults to true.
MANTLE_REQUIRE_OBJECT_CACHEForce Mantle to install an object cache even if the environment does not support it.
MANTLE_SKIP_LOCAL_OBJECT_CACHESkip the loading of a local object cache drop-in during local testing. See documentation.
MANTLE_USE_SQLITEUse SQLite for the database connection. See documentation.
WP_DB_CHARSETThe database character set. Defaults to utf8.
WP_DB_COLLATEThe database collation. Defaults to (empty).
WP_DB_HOSTThe database host. Defaults to localhost.
WP_DB_NAMEThe database name. Defaults to wordpress_unit_tests.
WP_DB_USERThe database user. Defaults to root.
WP_DB_PASSWORDThe database password. Defaults to root.
WP_DEFAULT_THEMEThe default theme to use during testing. Defaults to default.
WP_MULTISITEFlag to install as multisite when testing. Defaults to 0.
WP_SKIP_DB_CREATESkip creating the database during testing. Defaults to 0.
WP_TESTS_DOMAINThe domain to use during testing. Defaults to example.org. See documentation.
WP_TESTS_USE_HTTPSFlag to use HTTPS during testing. Defaults to 0. See documentation.
WP_VERSIONThe version of WordPress to install during testing. Defaults to latest.