marvinlabs / wpca-products-build-environment

Our developer environment to help building add-ons and contributing to the plugin -- MOVED TO https://gitlab.com/wp-customerarea/tools/wpca-products-build-environment
https://gitlab.com/wp-customerarea/tools/wpca-products-build-environment
3 stars 1 forks source link

Configuration of plugins and theme directories #5

Open vpratfr opened 9 years ago

vpratfr commented 9 years ago

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

tlartaud commented 8 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);
vpratfr commented 8 years ago

Better ?

define('WP_PLUGIN_URL', 'http://' . $_SERVER['HTTP_HOST'] . '/wp-content/plugins/');
define('WP_CONTENT', 'http://' . $_SERVER['HTTP_HOST'] . '/wp-content
tlartaud commented 8 years ago

No. Not the same thing at all ^^

tlartaud commented 7 years ago

@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.