Skip to content
This repository has been archived by the owner on Aug 21, 2019. It is now read-only.

Configuration of plugins and theme directories #5

Open
vpratfr opened this issue Sep 19, 2015 · 4 comments
Open

Configuration of plugins and theme directories #5

vpratfr opened this issue Sep 19, 2015 · 4 comments

Comments

@vpratfr
Copy link
Member

vpratfr commented Sep 19, 2015

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
Copy link
Contributor

@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
Copy link
Member Author

vpratfr commented Apr 4, 2016

Better ?

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

@tlartaud
Copy link
Contributor

No. Not the same thing at all ^^

@tlartaud
Copy link
Contributor

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants