I have customized my (local) install (dev box). The current directory structure is:
./root |- wp (WordPress Core root) \ |- wp-config.php |- wp-content (Content and Vendor root) \ |- mu-plugins (...) |- themes (...) |- plugins (...) |- uploads (Custom uploads dir) |- vendor (Composer installed libraries) |- index.php (loads ~/wp/index.php > require( dirname(__FILE__).'/wp/wp-blog-header.php' ); )
wp-config.php, I have the following setup:
define( 'WP_SITEURL', 'http://example.dev/wp' ); define( 'WP_HOME', WP_SITEURL ); define( 'WP_CONTENT_DIR', './../../wp-content' ); define( 'WP_CONTENT_URL', 'http://example.dev/wp-content' ); define( 'WP_PLUGIN_DIR', '../../wp-content/plugins' ); define( 'WP_PLUGIN_URL', WP_CONTENT_URL.'/plugins' ); define( 'WPMU_PLUGIN_DIR', '../../wp-content/mu-plugins' ); define( 'WPMU_PLUGIN_URL', WP_CONTENT_URL.'/mu-plugins' );
It is a single site install and none of the following constants is defined (and therefore falls back to default):
As @Sven (Hofmann) asked me in chat: The only plugin running on the
*_url filters is one mu-plugin that sets up the new themes directory:
add_filter( 'theme_root_uri', 'switch_theme_root_local' ); add_filter( 'theme_root', 'switch_theme_root_local' );
As you can see, there's nothing that can conflict with internal URls.
Step 1) When I go to the "Media Library" and click/open an attachment, the modal opens like normal and displays the media file (or in the problematic case: the image).
Step 2) Hit the "Edit Image" Link above and the following screen (modal replacement) appears. Note the broken image. I opened Chromes dev tools to show the el and attributes/path.