Open vpratfr opened 9 years ago
@vpratfr This need to be added to build-environment\vagrant\www\wordpress-default\wp-config.php
in order to make plugins work properly with our symlinks configuration.
// Environment related
define('WP_ENV', 'development');
define('WP_CONTENT_DIR', __DIR__ . '/wp-content');
define('WP_CONTENT_URL', "http://local.wordpress.dev/wp-content/");
define('WP_PLUGIN_DIR', dirname(dirname(__DIR__)) . '/wpca-plugins');
define('WP_PLUGIN_URL', "http://local.wordpress.dev/wp-content/plugins/");
// Errors display
define( 'WP_DEBUG', true );
define('SAVEQUERIES', true);
ini_set('display_errors', 1);
define('WP_DEBUG_DISPLAY', true);
define('SCRIPT_DEBUG', true);
Better ?
define('WP_PLUGIN_URL', 'http://' . $_SERVER['HTTP_HOST'] . '/wp-content/plugins/');
define('WP_CONTENT', 'http://' . $_SERVER['HTTP_HOST'] . '/wp-content
No. Not the same thing at all ^^
@vpratfr
Because the VVV2 structure changed (they added a public_html folder where wp is installed), you know need to add this in wp-config.php
in order to make our plugin structure compatible, and to allow sourcemaps to work while developing.
// Environment related
define('WP_ENV', 'development');
define('WP_CONTENT_DIR', __DIR__ . '/wp-content');
define('WP_CONTENT_URL', "http://local.wordpress.dev/wp-content/");
define('WP_PLUGIN_DIR', dirname(dirname(dirname(__DIR__))) . '/wpca-plugins');
define('WP_PLUGIN_URL', "http://local.wordpress.dev/wp-content/plugins/");
// Errors display
define( 'WP_DEBUG', true );
define('SAVEQUERIES', true);
ini_set('display_errors', 1);
define('WP_DEBUG_DISPLAY', true);
define('SCRIPT_DEBUG', true);
Just changed the
WP_PLUGIN_DIR
constant.
When installing the environment from scratch, the WP_CONTENT_URL and WP_CONTENT_DIR are not configured. We need to do this by hand.
We need to either document it or to fix it