I'm going with this git workflow for my current wordpress project which I'm running locally using MAMP
. It allows me to separate the WP core files from the theme and plugin folders using submodules, which is great. My wp-config
has some extra entries to tell Wordpress where the core files are and where the theme folders are:
if ( !defined('ABSPATH') )
define('ABSPATH', dirname(__FILE__) . '/wordpress/');
define('WP_HOME', 'http://' . $_SERVER['HTTP_HOST'] . '/core');
define('WP_SITEURL', 'http://' . $_SERVER['HTTP_HOST'] . '/core/wordpress');
define('WP_CONTENT_DIR', realpath(ABSPATH . '../wp-content/'));
define('WP_CONTENT_URL', WP_HOME . '/wp-content');
define('UPLOADS', '../wp-content/uploads');
My structure from the site root looks like:
-wordpress (contains core files)
-wp-content
-themes
-plugins
-uploads
-wp-config.php
So my home url is: http://localhost:8888/core/
The issues I'm running into all over is with the plugins. Some of them are using get_bloginfo('wpurl')
to load assets. So an example of that would look like this:
http://localhost:8888/core/wordpress/wp-content/plugins/{PLUGIN}/images/{PLUGIN_IMAGE}.png
where it should actually be:
http://localhost:8888/core/wp-content/plugins/{PLUGIN}/images/{PLUGIN_IMAGE}.png
Can I override this somehow without modifying the plugins individually?