Support » Plugins » Download Monitor multisite issue

  • Resolved jimbowes


    Hey there,

    I’m using Download monitor with WP multisite subfolder.

    All is working well in most aspects apart from when I upload a files via the Download Monitor interface.

    Files get a rewritten URL of:


    but really exist in:


    When using the plugin I get an error when trying to download files:

    Download path is invalid!

    However if I visit the rewritten URL in a browser I get to the file. This suggests there’s something the plugins download.php can’t cope with – but I can’t seem to work it out…


Viewing 15 replies - 1 through 15 (of 15 total)
  • Hey Jim,

    Having a similar problem in Multisite. If i network activate the download monitor plugin then downloads work fine per site i.e. if a download is set on the main site – it works on the main site, if a download is set on a sub-site it works fine on that site.

    However, sites do not share download monitor info between each other – i.e. if a download is set on the main site – then sub sites show message [download not found].

    Real shame as my client loves this plugin and am struggling to fix this!!

    Hmm your use sounds more complex that what I want it to do, I only want downloads available per site. I think it’s something to do with running in subfolder mode rather than sub domain.

    It is a great plugin. I think Mike who wrote it is planning a major rewrite for version 4 so that it works as custom posts.


    Hi Jim,

    I’ve actually found a solution for myself – i think it might work for you. Download Manager: There is a free version (which is enough for me) and a paid version with more features.

    Basically all the sites share a single database of downloads – which means they share download counts etc. So for me its perfect – as quite often the same file will be listed on 1 or more blogs. Its also got some other great features.

    Also no issues with paths as I network activated the plugin and all downloads are stored in the uploads folder of the main root site: /wp-content/uploads/download-manager-files, though can also be changed to an external server etc.

    Just install the plugin per site for your use and it works fine with paths – so I’ve read.

    Anyway works for me on Multisite 3.2.1, with subfolders.

    good luck Jim

    I actually tried the paid version but found it quite buggy for the use I was using it for. I think once a few more versions come out it could be better for my needs.

    I was having the same problem with Multisite and the ‘Download path is invalid!’ error

    I found a way to get it to work, see below.

    To fix Download Monitor so it works with multisite:

    Edit /wp-content/plugins/download-monitor/download.php

    Change line 93 to:
    global $wpdb,$user_ID,$blog_id;

    Change line 508 to:
    $thefile = str_replace( '/', DIRECTORY_SEPARATOR, path_join( ABSPATH.'wp-content/blogs.dir/'.$blog_id.'/', $path ) );

    Now the $thefile will be using the correct directory for a multisite blog and the download.php will find the path correctly


    Thanks for that, I got this working a couple of days ago – in a similar way – add:

    //for multisite installations
    if ( is_multisite() ) {
    $path = '/wp-content/blogs.dir/' . $blog_id . '/' . $path;


    $path = preg_replace( $patterns, '', $thefile );


    Your way is cleaner

    It’s an easy bit of code, hopefully they will include it in a future update

    Thanks, I did get some help though!

    I know this topic is a few months old, but I’m hoping someone can help with a similar problem using the Download Monitor plugin. I have a Multisite network (subdomains) and although the plugin works fine on a site-by-site basis, it will not show the root directory of my site when I’m trying to add files or “Add Directory” in anything but the main site.

    Hi jholter,

    Please see my previous post regarding Download Manager.

    Certainly has been working a treat for me.


    Thanks, I did see that post. However, I was using the “Download Manager” before I tried the “Download Monitor” plugin and it worked great until I purchased the pro version, then the problems began. After I purchased a license I learned that you have to purchase a license for every site on your multisite network, even though it’s technically on the same domain, and the cost is $125 for each. I tried to work out something with them but they stopped responding and I gave up.
    The guy that makes the “Download Monitor” plugin responded to my request for support last week and told me he’s not supporting the plugin anymore.
    I’m completely stuck. Any ideas?

    Hey there,

    In the Download Monitor config option have you made sure your file browser path is set up correctly in the options?

    It’s very sensitive to whether you use a trailing slash or not (you need to).

    Hi –
    Yes, I have checked and rechecked the paths and tried everything I can think of but it sees nothing.
    In my primary site (no. 1 in the database), the browser connected instantly with no trouble at all. The rest of the sites on my network are in virtual subdomains (wildcard setup “*”) and am using the Domain Mapping plugin to redirect my other domain names to the right site.
    I tried your solution (from 5 months ago) above yesterday hoping it would correct the problem but no luck.
    I think the domain mapping plugin is the main culprit. My main url (site #1) is ‘’ and one of the sub sites is ‘’ with my domain name ‘’ pointing to it and set as the primary url for that domain. Since the Download Monitor plugin uses the root directory of the main domain to locate files, there is nothing found for the subdomain sites since they are virtual.
    There has to be a way to change the path for all sites on the network but I can’t figure it out.
    I appreciate everyone’s input, especially since this topic is so old and had been ‘solved’, and would welcome any ideas or suggestions.

    That option doesn’t use domain on my setup for the file browser part – it uses a path on the server e. var/vhost/sitename/public_html/files/

    Or is your file browser working OK and your actual uploads are going wrong?

    It could be some rewrite rules – have a look at your htaccess and see if there are rules that would cause an issue.

    I’ve not used the domain mapping tool. Have you tried disabling it to see if everything then works OK?

    I do have the file browser path set up correctly (/home/mysite/public_html/). On my primary site the file browser works fine, just not on any of the other network sites.

    I can type in the relative path for the directory where my files are on the subdomain site and it will get all the files in that directory. It just will not show them in the file browser.

    All the links to the downloads work fine on a site by site basis. I can’t use one global set and apply the same ID’s on the subdomains; that doesn’t work.

    If I could get the file browser to work on the subdomain sites, I would be happy.

    I have not tried to turn off the domain mapping plugin. I was hoping to avoid that. It’s a delicate balance of perfect settings getting everything to work. If that did solve the problem of the Domain Monitor plugin, it creates a new problem with my sites and their domain names.

    The rewrite rules confuse me. I know what’s supposed to be there but if something is out of place, I wouldn’t be able to tell.

    I’m out of ideas.

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Download Monitor multisite issue’ is closed to new replies.