WordPress MU Domain Mapping
Plugins urls broken with different wp-content dir (9 posts)

  1. natostanco
    Posted 3 years ago #

    following this...

    I had to specify the PLUGINDIR constant into wp-config because the urls were construct from each plugin own directory resulting in http://mysite.com/style.css instead of http://mysite.com/custom/plugins/path/style.css

    So the use of the function to construct plugins url would be better :/


  2. Ron Rennick
    MultiSite Guru
    Plugin Author

    Posted 3 years ago #

    Thanks, someone else had already reported that so it's on the list to fix.

  3. EgyptUrnash
    Posted 3 years ago #

    I think this is what I just fixed. Spent like a half hour sprinkling echos throughout the plugin and WordPress. Making domain_mapping_plugins_uri check that the replacement it wanted to perform was actually possible did the trick for me:

    function domain_mapping_plugins_uri( $full_url, $path=NULL, $plugin=NULL ) {
    	if (stripos( $full_url, PLUGINDIR ) == FALSE)
    		return get_option( 'siteurl' ) . $full_url;
    	return get_option( 'siteurl' ) . substr( $full_url, stripos( $full_url, PLUGINDIR ) - 1 );
  4. Topher
    Posted 3 years ago #

    We had this same issue and resolved it by moving the plugin to mu-plugins and calling the domain mapping file properly.


    in /mu-plugins/wordpress-mu-domain-mapping.php

    Magically delicious.

  5. Pablo @ vDevices
    Posted 3 years ago #

    Does anyone have an opinion on the best/easiest way of addressing the plugins directory issue?

    In my WPMU subdirectory install, when I--as Super Admin--upload a new plugin, the zip file ends up in /wp-content/uploads/2013/06 (instead of /wp-content/plugins/).

  6. Ron Rennick
    MultiSite Guru
    Plugin Author

    Posted 3 years ago #

    @Pablo - you're not supposed to upload it you are supposed to install it through the network -> plugins screen.

  7. ClaytonL
    Posted 3 years ago #

    Thanks for the fix Egypt. Worked for us.

  8. ClaytonL
    Posted 3 years ago #

    Since this plugin is no longer in the mu-plugins folder, are some plugins running before the 'plugins-url' filter is added?

  9. miczh111
    Posted 2 years ago #

    Does the MU Plugin now work with different wp-content dir ?

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WordPress MU Domain Mapping
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic