Add From Server Plugin Page: [plugin link]

[plugin description]


[plugin screenshots]

Recent Changes

[plugin changelog]

219 thoughts on “Add From Server”

  1. hi !

    thanks for your work !!
    i added your plugin (to wordpress 2.6) but it says the files are copied, but in fact there not.
    all necessary rights are set on folders. the names of my copied images appear in the media library but without any picture. when inserting it into article, there no picture either.

    do you have any clue ?

    thanks a lot !


    1. It could be a known bug thats affecting you, Which i believe is fixed in the 2.0 release, The 2.0 release however currently requires WordPress 2.7+

      Can you check the /uploads/2008/11/ folder, And see if the images are copied there, And that the thumbnails have been created?

      1. thanks for your quick answer !
        yes i’ve checked that no pictures are created under uploads/2008/11…. :(
        i didn’t know wordpress was available in 2.7 version, is it ?
        so you advice me to wait for the next version ? :)

        thank you

  2. Hi there, I recently moved an old Blogger blog over to WordPress. I have lots of images that I realise weren’t copied over using the built in WordPress function. I had manually copied them all to the uploads folder, and sorted them into more folders by date (e.g. uploads/2005/10 etc) to match the WordPress method. They weren’t showing up in my Media Library until I found your fantastic plugin.

    I’ve just tested it on the first batch of images and like you said it doesn’t copy images already there but takes the file’s url as the date so I have items in the media library for each month (not too worried about individual days atm but I’ve yet to look at your other plugin “dpost-uploads”.

    There’s a problem, however: It seems to have taken the full url from the server for the image, so rather than –

    It is using –

    The result is that the links in the media library are broken and I assume they will be when I update the posts that use on those images.

    Any help you can give would be appreciated.

    1. That problem appears to be related to certain hosting setups, I hope version 2.0 (WP 2.7+ only) will fix that..

      But as for fixing it in the older version of the plugin, You can try removing line 162: (realpath)
      and see if that fixes it, There was a similar problem in core WP’s uploader at one stage

      So change it from:
      [sourcecode lang=”php”]
      foreach($files as $file){
      $file = realpath($file);
      $id = frmsvr_handle_file($file, $gallery);
      [sourcecode lang=”php”]
      foreach($files as $file){
      $id = frmsvr_handle_file($file, $gallery);

    2. Hi Dion, thanks for the speedy reply! I’m afraid it didn’t work (assuming I amended it correctly). If this is a quirk of my hosting setup then I’ll guess I’ll live with it, but thanks for your suggestion. I think I’ll just amend the links in my posts now and then to convert them all over to the WordPress uploads folder, and not worry about being able to see them in the Media Gallery since they’re old posts anyway.

      Still, I will keep one eye on your blog. Thanks again=)

  3. Hi !

    Your plugin is great but there is a hudge problem : you can browse the whole file system, even the files that are out of the www directory. This can be a security problem on shared hosting environement.

    I edited add-from-server.php so that you can set an optional root folder in your wp-config.php to prevent users from browsing out of this folder :

    // Root path for Add From Server plugin
    define(‘FRMSVR_ROOT’, dirname(__FILE__).’/wp-content/uploads/’);

    I also removed the “Parent folder” link if the current folder is the root.
    Here is the diff :

    [DD32 Edit: The diff is too large to post, If you’d like to follow up with a link to a diff hosted somewhere, that’d be good, See my comment in reply – also note, It’ll be non-compatible with version 2.0 due out in the near future when WP 2.7 is released]

    1. Hi Nicolas,
      I’ve decided against implmenting your suggestions, The Plugin is designed to allow access to the filesystem of the server, If the webhost has insecure permissions (Like many slack shared hosts), Then that is not my problem, Its the hosts problem to give their customers better security/privacy, One of the reasons that mass-deface attacks can take place is because of shared hosts with slack filesystem permissions.

      So in short: I see it as a Hosters security problem, which THEY need to fix, Its not a security issue for the plugin. My plugin does nothing special/out of the ordinary than any other PHP script, so its not like the plugin purposely bypasses hosts security measures.

        1. You should be able to access files that are outside of the www directory, As the file is copied to the WordPress uploads folder upon adding (Unless it allready exists within the WordPress uploads folder).

          I understand that it doesnt affect the functionality of the plugin, and on furthur thought, Ignoring the ‘security’ issues, I can see that some users might like to make a certain folder their ‘root’ folder for situations where the path is long(like some shared hosts), I might actually add some functionality along those lines to 2.0, But no promises :)

          1. this “hack: would be interesting only for wpmu users, I guess, as tehre are a multitude of blogs hosted within one instance of wpmu… but as free blogs rarely come with the ability for FTP upload files, this is of limited use…

  4. hi there.
    I gave your 2.0 alpha version whirl, and it works perfectly for me.
    There is only one thing though, if you could add that this would be fabuluos:

    could your plugin also execute all actions/filters that are executed when a file is uploaded through the normal media interface?

    i.e. I have several plugins that do affect uploaded files as resizing them to a certain size, changing their names if spaces, dashes and underscores appear in the filename, etc.

    1. I’ll look into it.

      I’m not too sure of which hooks wouldn’t be firing, If you’ve got examples of plugins which are affected, that’d be greatly appreciated.

      1. hey, this plugin is not firing: h**p:// at least that’s the only one I can see not working right now. The renaming of the files does work. I am using h**p:// for the renaming.

        I tried to destroy my links so my comment doesn’t get caught as spam.

        1. WordPress is smart, it detects you attempting to bypass the comment link-number filter..

          Thanks for the plugin, i’ll look into the hooks it uses and see what i can manage :)

  5. This plugin is awesome! I just noticed 2.0 was released with WP 2.7. Is there a changelog for 2.0? I’d love to see what’s new.

    Thanks for your hard work!

  6. I really love your plugin… amazing, I had issues to start with but now it seems to be working with the recent update…. ISSUE: When I click import it takes me away from the back-end of WordPress… with no way back (other than reloading your website). Would be nice to have a link back to the Media tab.

  7. I’m having problems with some .flv files I’m trying to add. They don’t appear to get the MIME type set when I use Add From Server. This is causing trouble for the theme I’m using as it is looking for the MIME type to display the attached video.

    I’m not sure if this is something with your plugin or not though. The file I’m trying to upload is larger than the max size allowed on my server. I had FTPd the file to my server and then was hoping to use Add From Server to pull it into WordPress.


    1. To follow-up, I setup a test server and I can confirm that when I use the WP upload functionality, the MIME type is set properly (application\octet-stream) for the .flv files but when I use Add From Server, it is blank.

      Any ideas?


      1. Not a clue, I thought the mimetypes were being handled the same as WP does.. But i’ll look into it tomorrow and get back to you :)

        1. Mime-types are working as expected for me with the latest version of the Plugin.. So not sure why its not working for you, I use the exact same WP function call for getting the mimetype that WordPress uses..

  8. Didn’t work for me, which is a shame! The import worked ok, but the paths it generated to embed the images in my blog were all waaay off. For example if a file was in a folder called /portfolio/images/image1.jpg, the path it ended up trying to find the image at was /uploads/2009/01/image.jpg

    Maybe just a bug with my install?

    1. Quite possibly because you’ve mis-interprated the usage of the plugin.

      The plugin is designed to import files from elsewhere on the server into the WordPress uploads, it copies the file to the uploads folder, it does NOT continue to refer to the old location of the image.

  9. Greetings Dion,

    Since I’m using WP 2.6.1, I’ve just installed your 1.4 version. When I’m in the Add Media window and try selecting multiple files that I’d like to add, I’m getting the following error:
    Fatal error: Function name must be a string in /vhost/vhost8/g/s/c/my-domain-name/www/wp-content/plugins/add-from-server/add-from-server.php on line 218

    Any suggestions would be greatly appreciated, thanks!

  10. It’s not working for me – I’m running 2.7 and whnever I activate and try to access add from server I get this: “Cannot load add-from-server.”

    1. Are you accessing it from the Plugins page or the Menu?

      Are you running any non-standard WordPress Admin themes? Or any plugins which mess with the menu?

      1. I’ve got the same problem : I click on “Add from server” located under “Add from server” on the plugin page, and I get the message on an new page : “Cannot load add-from-server”. The URL of this page is
        By the way, I’m using a French language.
        My WP version is 2.9.1
        My add-from-server version is 2.2.1

        Thank you for your help, as this plugin seems very useful.

      2. From the plugins page, the Add-to-Server link generates “Cannot load add-from-server”…
        but from the menu, it works fine.

        using v. 2.9.x

  11. tres smart. is there any way to ‘add-from-to-server’ by that I mean move something from server to another dir/folder on the SAME server that IS NOT /wp-content/uploads/MM/ (where MM is month, my current upload configuration).

    I’d like to add-from-server some specific content (mp3s, flvs) to non-calendar folders, like /wp-content/uploads/mp3s/ etc. and have that content accessible via the Media Library. Basically just trying to get away from certain media being in calendar folders. is this possible?

    Brilliant! thanks for this useful plugin.

    (I’m on WP 2.7.1 and PHP 5.2.x and everything is smooooooth)

    1. No, However:

      If you create the /uploads/mp3s/ folder, and manually move the files into that folder, and then import using Add From Server, It’ll add it to the media library, and the files will stay put.

      Add From Server only copies them if the original exists outside of the uploads folder (it cares not for the month folders)

  12. Ahhh! Interesting tweak, I like it!

    Have a localhost running and just tested this, works like a charm! Brilliant stuff DD32!

    1. hi DD32, I’ve ran into something of a snag. On my localhost everything works fine, but on my global site my added-from-server files, which are currently stored in a /covers/ folder in the wp-contents/uploads directory, are showing up in the Media Library blank, as empty JPEGs in my current situation. If I ‘view’ the file the source code shows the following:
      it’s looking for the file in the year-month folders!

      however the plugin did properly create thumbnails of the image in its folder:

      but the image isn’t viewing in the Media Library! Very strange. Both my localhost and global are PHP 5.2.5 and WP 2.7.1

      Any advice? On my localhost all is smooth, on global site it’s snagged. I’ve deleted the plugin and gone from scratch, the situation is recreated every time.


      1. Sounds odd… I have to admit, I dont actually use the plugin myself very often, I’ll have to do some testing for you and see if theres any bugs in that code branch..

        1. thanks DD32, I have a lot of use for this given how I keep files on my server.

          I did just realize a mistake on my part, my global site is only running PHP 4.4.9, whereas my localhost is on 5.2.5 – I don’t know if this has any effect on your plugin, I’m sure you might be able to answer that.

          I think my host can switch back and forth between PHP versions; I’ll write them to confirm this, then test the plugin again to see if its the PHP version.

          Clearly it might be more complicated than I thought.

          1. I don’t think it’ll be the fault of the PHP version, But if it is, I’ll have to take that into consideration.

            Is your local test server linux or windows?

  13. I am getting the following error when try to Import media:

    Catchable fatal error: Object of class WP_Error could not be converted to string in /home/content/b/r/t/brtutor/html/wp-content/plugins/add-from-server/add-from-server.php on line 136
    I am using the latest version of WP and the Add-From-Server plugin.

    1. Looks like you’ve got an error with your upload directory, wp-content/uploads/ is probably not writable by the server i’d say.

      Does the standard WordPress uploader work?

      I can release an update for it to correct that error condition, But to be honest, i’m not going to bother right now.. I’ll see if any other conditions need checking next week. If you can fix the underlying error with your server, then the plugin should skip that error condition check.

      1. The standard WP uploader did not work – I also made sure the directory was 777 and it was and it still didn’t work.

        Here is the solution –
        Goto Settings -> miscellaneous
        In “Store uploads in this folder” I for some reason had it set to “/videos” and it needed to changed to the default of “wp-content/uploads”

        Just to be helpful, it would be cool in your code to tell the user to check that setting.

        1. Except it doesnt matter what thats set to, as long as its set to something valid.

          /videos isnt a valid path that would be useable on your server.. ‘videos’ without the slash would’ve worked however.

          1. Yup, I figured that out. I just named it “videos” and that worked.

            I wish there was a quick way to index all my media on a web page right after I upload new media to “video”. It still a pretty manual process to create the hyperlinks to the videos after I upload them to the server.

  14. I find your plugin very useful, but have just upgraded to WordPress 2.8.5, and now it no longer works…. Any suggestions to get it working again?

    1. Running into the same issue, also running on the 2.8.5 release of WP. When I try the wp-admin/media-new.php?page=add-from-server function, I get the error “You do not have sufficient permissions to access this page.” Guessing something in the 2.8.5 security updates is blocking the plugin again.

      1. Starting from wordpress 2.8.4, WordPress no longer allows “Unfiltered Uploads” that meaning, That uploads may only be of a small set of “valid” upload types.. (And Admins must install a plugin to allow other types of files..)

        See for info on why..

        The solution to re-enable it is to add this to your wp-config.php file:
        define(‘ALLOW_UNFILTERED_UPLOADS’, true);

        While i wasnt planning on releasing an update for this, I am going to release another version shortly, There is a huge but however, It’ll allow any user who can upload files to have access to it.. which is not what some people will want, But until the next major release, thats what i’ll be doing.

  15. Auto-upgrade has hosed my dashboard:

    “Warning: include(inc/class.dd32.php) [function.include]: failed to open stream: No such file or directory in /homepages/26/d89912342/htdocs/wordpress/wp-content/plugins/add-from-server/add-from-server.php on line 36

    Warning: include() [function.include]: Failed opening ‘inc/class.dd32.php’ for inclusion (include_path=’.:/usr/lib/php5′) in /homepages/26/d89912342/htdocs/wordpress/wp-content/plugins/add-from-server/add-from-server.php on line 36

    Fatal error: Class ‘DD32’ not found in /homepages/26/d89912342/htdocs/wordpress/wp-content/plugins/add-from-server/add-from-server.php on line 51”

    1. Yep, Sorry about that, Supid package manager screwed up. 2.2.1 was released shortly thereafter, but might be delayed..

  16. Pingback: media » Yabbox
  17. I would like “move” the file ( delete the file in the orignal folder after copy it to /upload folder .

    Can I change the plug-in ? how ?

    Thanks very much

    1. If the uploaded file exists within the uploads folder to start with, it’ll simply be added as is. If it exists outside of the uploads directory, it will be copied there. Sorry, but i cant help explain where to change it to move instead of copying right this instant – my only suggestion is to upload to the uploads directory, and then import.

  18. ed to this post on 22 November, 2009

    […] I have uploaded a video to the media manager on WordPress (I had to use the Add from Server plugin) as php.ini has a 2MB upload limit and then the media manager had a problem crunching a […]

  19. Hi

    Thanks for the plugin! I’m having a problem using it with m4b files tho and get this message:

    “Walk One – Clip_1.m4b was not imported due to an error: File type does not meet security guidelines. Try another.”

    Anything you can do?


  20. Hi Dion.

    Just tried the plugin and it works great. I was wondering if there is a way to set it to watch folder automaticly and import new files when they are added.

  21. Hi, I’ve just been looking at this plugin and found that the lack of images in the list of images makes it difficult to know what the image is.
    So I’ve just added a little hack to show the image in the image list (scaled down with html).
    Not sure where to post the code, or if your interested in adding it to this plugin.

  22. I recieved this error upon attempting to activate the plugin.

    “Cannot load add-from-server.”

    Any suggestions?


  23. I am having the same problem as Mark.
    I recieved this error upon attempting to activate the plugin.

    “Cannot load add-from-server.”

    Any suggestions?

  24. I found a little hack how to change your plugin to include a file to the media library that has been directly uploaded into the “uploads” folder. (One might wants to do this if there is a file permission problem that can’t/is too cumbersome to be solved)

    Just comment out lines 192-199 in “add-from-server.php”!

  25. Hi,
    your plugin is great, but I can only copy one level to Media Library. I think its better user can copy recursiv all old folders.
    (Sorry about my bad english)

  26. I used this for a site which I had password protected via .htaccess. Because of this some of the plugins we where using to upload files didn’t work and add-to-server saved the day by allowing us to ftp files to a server and then move them. Thanks.

    A quick question though. I noticed it shows the entire filepath to the root folder. We have several sites on the server and don’t want users to go snooping around. Is there a way to limit the scope of where it can go or how much it can show of other peoples folders.

  27. I have the same problem as Alicia and Mark. I recieved this error upon attempting to activate the plugin.

    “Cannot load add-from-server.” or in German: “Add-From-Server kann nicht geladen werden”

    It would be great if you can solve the problem.

  28. I’m sorry – it was my fault. I klicked the wrong button ;) Now I’ve read your description at the beginning of this page and realized, that the plugin is running in the mediathek and not in the plugin folder – so it works :)
    Thank you for writing it above – it helped me a lot :)

  29. This plugin is awesome!
    I have been looking for something like this for a very long time.

    Thank you so much for sharing it.
    You’re a legend!

  30. I’m having issues importing.
    If the filesize is “relatively small”… e.g. 120MB or less, it imports just fine.
    Greater than 150MB, it tends to freakout giving me all kinds of mtime() errors or just refreshing and bringing me back to add-from-server.php

    My files uploaded fine via FTP and add-from-server finds them…
    imports fail because the filesizes are too large.

    Are there any php.ini lines that I should manipulate to get this to work?


    *also, using 2.9.2

    1. Warning: filemtime() [function.filemtime]: stat failed for /home/users/web/—-/—–/—–/—-/uploads/temp/ in /xxxx/xxxx/xxxx/xxxx/server/—-/—-/wp-content/plugins/add-from-server/add-from-server.php on line 183

      of course the “—-” and “xxxx” are replaced with my folder structure.

    1. It works for me on WordPress 3.
      On localhost it’s fine, but on my webserver, the dates are a bit messed up. But I guess this comes from my server…

      1. The dates on mine are also getting messed up. I’d assumed it was that my weird photo-editing software was playing with the EXIF data, but perhaps it’s something in Add-From-Server. (Still, it might just give me the impetus to write a plugin that I’ve been wanting for a few years: edit-attachment-dates!)

    2. Well, just installed now in WP 3.0, let’s see…

      Ok, activated, admin page shows. Directory navigation works nicely, found the .jpg I wanted, checkboxed and hit “Import”.

      Page loads for a bit, then shows blank. However, when checking the media library it’s all good and I’ve got my image right there.

      So, from what I can tell, the only thing in need of fixing is some sort of confirmation page that the file’s been imported.

      Edit: Upon inspection, the file’s date is listed as 1/7/10 (not today’s date), but they may have been the date that it was uploaded so I’m happy to say that this plugin works!


      1. Oh, sorry, there’s another problem that I didn’t spot at first: after the import, when inserting into a post, the size of the image is listed as “0x0” (i.e. 0px tall and 0px wide)

        Just letting you know XD

        1. Yes, The dates will be set to the date that the file was uploaded.

          I cant reproduce the problem of them showing up as 0x0 however.

          1. Huh, odd.

            It’s the same result (but I doubt cause) of the HTTP Error in the Media Uploader that I sometimes get also… (the problem is described here.

            I wouldn’t think that they’re related, but…

            Anyway, I have no problem with the date of the file being the uploaded date.

          2. I’d say theres something else on the server causing the issue, Perhaps an older version of GD being installed (Or complete lack of GD).

            I’m talking of the GD PHP Extension, Its the one thats responsible for image manipulations.

  31. I love your “Add from Server” WordPress plugin, but I found a serious flaw: It doesn’t properly handle URL encoding.

    But don’t feel bad, WordPress 3.0 has a similar bug, which I just reported:

    I also discovered a relatively minor flaw in that the form “name” attributes that you “sanitize” can produce non-unique names.

    Email me if you want the patch file.

    1. As you point out, Its a bug in WordPress. It generates the URL’s.

      I have however applied that as a fix to the next release for the GUID (since its in a url form at present)

  32. A minor fix for correct display of error messages:

    Index: add-from-server.php
    --- add-from-server.php (revision 287732)
    +++ add-from-server.php (working copy)
    @@ -157,7 +157,7 @@

    // A writable uploads dir will pass this test. Again, there's no point overriding this one.
    if ( ! ( ( $uploads = wp_upload_dir($time) ) && false === $uploads['error'] ) )
    - return new WP_Error($uploads['error']);
    + return new WP_Error('Upload directory error', $uploads['error']);

    $wp_filetype = wp_check_filetype( $file, null );

  33. How can I simply stop the script from copying to a new location?

    I have a folder called /uploads/videos

    I will only be uploading videos to this folder as my server will not allow large uploads.

    Question: how can I stop the script from moving the file, and just have it reference it’s existing directory?



    1. I want to implement this change because files are not being copied.
      I do not receive any errors, and it displays in the media folder, referencing its original location, but when i try to add to page, it references the folder it should have been copied too…

      any help appreciated.


  34. This weak ass plugin. The bug is so bad that it not only breaks the functionality of the back office, but it also spreads the bug to other plugins to a point where you have to uninstall all of the plugins and re-install them to completely get rid of the bug. And the owner does not even seems dedicated enough to create a new version at a faster enough pace for such a important plugin but instead he’s taking his time. I’ll never this plugin again. A damn shame.

    An administrative reply: Fix it yourself. I don’t care about you, or what you think about the plugin. I do not have time to support this plugin, or any plugin right now. You might say “It’ll only take 5 minutes!”, and you’d be right, but that’ll be one weak ass fix like yourself. So fuck off, I dont want you using my plugins, as I do not want to support mindless turds like yourself. As for everyone else, Yes, I’m sorry there’s a bug there, Thank you to the people who have pointed it out, and even provided a fix for it, When i’ve got time to actually test something before releasing it, i’ll do so. Until then, hold tight.

  35. Hey DD32 Dudes. Installed the plugin and love it.
    We have a subfolder in uploads called film that we ftp large videos to.
    We have also hooked into our upload_mimes filter to add custom mime types.

    Everything works as expected… except it seems to break the Media Library view. It shows that x videos are in the WP media library, but the only way to manage them (change name, etc) is by viewing all media that is not attached to any post.

    Has anyone else experienced a wonky effect on the media library when using this plugin?

  36. Hey,

    First of all, thanks so much for all your hard work. This plug-in is amazing. I was wondering, though, if there’s any way of changing the target directory from wp_content/uploads to, say, wp_content/pictures?

    I’m running a blog with several hundred pictures already on it and I would like to use certain plug-ins to add e.g. exif metadata details below the images. Some of these plugins depend on the images to be in the media library.

    If I import all the images from the server to the media library through your plugin, I would have to change the href of every image on my blog. If I could import them into the media library while leaving them on the wp_content/pictures folder, this wouldn’t be a problem.

    Is there a simple way of adding the necessary changes to the plugin code in the plugin editor? That would be awesome.

    Again, thanks for all your hard work, and keep it up!


  37. Is this plugin working on the WP Ver 3.0 ++ . Because i am getting error “was not imported due to an error”

  38. I have previously installed Add From Server on other websites and it has worked great. I just installed it on a blog hosted by Godaddy for a client. It isn’t showing up when I try to upload a file. Does the plugin have an issue with Godaddy? We are using WordPress 3.13

  39. Great plugin thanks. When I add an image from the server it creates seven extra files all different sizes (see below). My Media settings are set too 150, 500 & 1024. How do we get it to do just these. Thanks Muz


    1. WordPress Generates extra image sizes for various uses, Chances are, you’ve got a plugin or 2, or a theme, which requests those extra sizes.

      So, in short: Don’t use whatever plugin is asking for those sizes.

      1. Thanks, I had all the plugins disabled so I disabled the theme and walah.

        Thanks again for the awesome plugin. M

  40. I have tried to upload a .flv file but it says it’s not permitted. I cannot find the FAQ, though.
    Can you post easy-to-follow instructions on how to allow .flv?

  41. I have a question about the Add from Server plug in.

    When I try to import more than 1 photo, I get a “Fatal error: Out of memory (allocated 69468160) (tried to allocate 19008 bytes) in /home/jules/public_html/wp-includes/media.php on line 254” error. I would have to manually select one photo to import at a time. I’m not sure what’s wrong with this and if there’s any way to fix it. I’ve read numerous blogs and added the MAX 256M to different pages, and still have the same issue. I even contacted my host and they can’t figure it out.

  42. Hello

    I have the problem, that my WordPress Root path is: /is/htdocs/wp10588340_BXSQ9NMU/www/ and your plugin always changes this to /is/htdocs/wp10588340_bxsq9nmu/www/ – so it is not working.
    Can you tell me how to avoid this?


    1. Hi,

      The plugin will use the file -in place- if you upload it into your uploads folder, so if you put it in /uploads/a-folder-name/ it’ll just use it in-place into the media library without copying it.

      If you upload it outside of the uploads folder, it’ll just copy it to the destination.

      Currently, there isn’t an option to delete files after importation, this is primarily due to the first option being available for that.

  43. I have uploaded a file via filezilla, and it does come up when I click on add from server. Then I tick it click import and after about a min it says 500 internal error.
    Any suggestions?

    Thank you!

  44. Pingback: Skimmer Weir
  45. Hi!,

    i used your plugin and well… congrats! it’s pretty useful but now i was wondering if you could add a new feature? like going on reverse and instead of uploading it… just make it disappear from the media library but it would still be there on the server… the plugin would be so awesome like that, it would also help a lot for those users like me with some shared servers with limited cpu stats…


    1. Just a FYI.. That’s not going to help your CPU cycle count in the least.

      Get a better host if you’re running on a blades edge with the cycles, or install a decent Caching plugin to relieve some stress

  46. I uploaded a large PDF document via FTP and it is listed in RED. Can you please advise how I change the security settings to allow me to add from this from the server. I have the mime plugin and added PDF, but still no good.

  47. Hi – great plugin. I am running WP 3.31 Multi-site. In the settings I placed
    At the server I created the users folder
    When I try to access add from server through media upload it says Error: This users root directory is not readable. Please have your site administrator correct the Add From Server root directory settings.

    What did I miss?


  48. Is there a way i can stop files from being copied to the wp-uploads folder when i attach them to a post? Thanks

    1. upload them into the uploads directory, and Add From Server won’t have a need to copy it anywhere.

      If you upload them into a different directory Add From Server/WordPress can’t reliably detect the HTTP url to the file, and it isn’t reliably going to work with other plugins.

      1. Thanks for your quick response.

        Can i create a new folder within the uploads directory so that i can use the plugin to only browse that directory? Will this stop the duplicating of files?

        Thanks again.

  49. Pingback: My Wordpress Setup
  50. Does this work with WP 3.4.1? I am getting an error message:

    The users root directory is not readable…..

    What needs to be done?


  51. Same as Jim above here.
    I can save the root directory in settings, so it seems it is correct (since if I save the wrong directory will give me an error); but when I go to Media/Add from Server then I get the “not readable” error.
    Any ideas?

    1. This error means it’s incompatible with your server (for now).

      A future release of the plugin may support the edge case server configurations which cause this.

      There is no ETA on a release which will fix this.

      For all those that are affected by it, You’re out of luck for now.

  52. Hi,
    I liked the plugin, unfortunately my host upgraded to PHP 5.4 and the plugin prevents the admin panel from loading properly. Changing line 137 of class.add-from-server.php (&$ replaced by $ since it is not tolerated anymore in PHP 5.4 I was told) gave me access to the panel.
    My 2 cents ;)

  53. Hi Dion,

    Great plugin! Although I noticed it adds an excessive amount of extra thumb sizes when import to media library. FOR EXAMPLE I had 165 files in the upload folder, after add from server I now have 710!!! How is this possible any way of preventing this?

    Urgent response much appreciated!

    1. Not much you can do about this, WordPress generates thumbnails for each size you request, otherwise you’ll be sending the full sized image to every single browser which slows down the loading of your site.

      for 165 files, 710 sounds about right (Thumbnail, Medium size, Large size, Theme requested sizes (ie. custom header)) 165*4 = 660 extra thumbnails required.

  54. This looks like a nice option. Currently I am trying to restore one WordPress website from an archive that is probably around 125MB. Certainly by today’s ever growing size standard, the file does not seem so large to me. However there seems to be endless info regarding modifying the php.ini file.

    With web hosts always downgrading their service based on usage patterns, I like to keep my sites portable. I think I finally may be through with Blue Host. Just about every issue regarding modifying an phh.ini file which is “too small” seems to have something to do with this host!

    I guess it may be time to find a good web host that caters to active websites. and offers excellent 24 hour help via chat. Could you recommend such a host?

  55. Hi. Two questions.

    It is possible to make Add from Server work recursive, as in so that it searches within sub-directories?

    Also, I have a domain where Add from Server does not see images files kept within server files. The files are there, I can see them with an FTP app. They are 644 and directories 755. However, I cannot see them via wp-admin > Add from Server.

    Actually, I cannot see them in WP’s own Media library and so I feel there must be something else wrong but hoped AfS would fix it.


  56. I got the following error…..

    Warning: in_array() []: Wrong datatype for second argument in /home/pallaoky/public_html/wp-content/plugins/add-from-server/class.add-from-server.php on line 179

    Warning: in_array() []: Wrong datatype for second argument in /home/pallaoky/public_html/wp-content/plugins/add-from-server/class.add-from-server.php on line 179


  57. I liked the plugin, unfortunately my host upgraded to PHP 5.4 and the plugin prevents the admin panel from loading properly. Changing line 137 of class.add-from-server.php (&$ replaced by $ since it is not tolerated anymore in PHP 5.4 I was told) gave me access to the panel

  58. I’m developing a multi-site and I’d like to be able to make a call to your plugin ( fantastic btw ) when a child theme is activated to load test/standard images that are in a sub-directory of the child-theme and not only put them in the media library, but attach them one by one to a nearly created page/post and set the image as the featured image. I can create all the posts/pages/custom posts I like on theme activation but getting an image into library is a bit of a bugger.
    Any thoughts, ideas?

  59. @DD32,
    Thanks for the great plugin, one of the WP best!
    One more wish–
    Would you add chinese file name support in Add From Server? I added the following code in wordpress\wp-admin\includes\file.php right below the line
    wp_unique_filename( $uploads['path'], $file['name'], $unique_filename_callback );

    and it works with WP original uploader. It changes to use time as filename while keep the original file name as attachment title.

    $fileTypeNameArr =explode("." , $filename);
    $fileExt = $fileTypeNameArr[$countNum];
    $filename = time().'-'.rand(0,999999999).'.'.$fileExt;

  60. I have a large xml wordpress file and it’s not possible to upload it via the interface, if I upload it to the server can this pluging add the posts to a site?

  61. Hi there!

    I just wanted to inform of a little bug I’ve found.

    Line 137 of file class.add-from-server.php reads:
    $this->settings = new add_from_server_settings(&$this);

    Passing by reference in this way is deprecated since PHP 5.3. It must be stated in function definition / class constructor instead.

    If you try to run this plugin in PHP 5.4 (which I did) you’ll find a Fatal Error is thrown in WordPress Admin area.

    The fix is quite trivial, just modify line 137 of class.add-from-server.php and line 4 of class.add-from-server-settings.php.

    By the way, I found this bug when investigating a problem. When trying to access wp-admin/upload.php?page=add-from-server I got an internal server error (500). I tried deleting, deactivating and changing php version. I still get the error…
    Could you help me please??

    Thanks in advance!

  62. Hi,
    i have this message in the backend:
    Warning: in_array() expects parameter 2 to be array, string given in /web/htdocs/ on line 179
    Can you help me?

  63. Brilliant plugin!
    Just saved me hours transferring images from another platform into WordPress for a client’s very extensive hand-crafted goods website.

  64. Call time pass by reference has been removed in php 5.4.4

    Function definitions exclusively should be used for passing argument’s by reference.

    class.add-from-server.php line 137
    class.add-from-server-settings.php line 4

  65. When I try to install, I get this error; Fatal error: Call-time pass-by-reference has been removed in /homepages/11/d451077200/htdocs/wordpress/wp-content/plugins/add-from-server/class.add-from-server.php on line 137

    Any help? I would love to be able to use this plugin.

  66. I may be missing something, but when WP imports a media file it puts dashes between words if there are blanks. Add from Server just removes the blanks. So when I use a plugin to add a video clip with MP4 and WebM formats with a poster pic, it uses a file name with dashes but the file had spaces and the import reference has no spaces. I have to manually edit the reference.

    Can a future version have an option to add dashes like WP’s media importer does?

  67. If there is any special character in the name of folder or file then its not getting attached using the “Add From Server” plugin. It get attached normally using normail upload of wordpress. Please help.

    1. I have uploaded all my pictures in the many folders. Now when i try to attached pictures from specific folder to particular post, it works fine if there is no special character in the file like angelina jolie. However when i try to select folders whose name have special character like Luz-Elena-González (speical character in “a”), Adrianna-Léon (special character in “e”), such folders not getting selected via this plugin. Same is the case if i select file whose name has special characters. It may be the problem of coding UTF-8. But i have checked from my server end. It has UTF-8 as unicode. I am not able to figure out the problem. Anybody knowing the solution please help me.

  68. The reason some persons are having trouble with this plugin, is the depreceated usage for &$this in the file class.add-from-server.php. And some server report this (minor) error, some don’t.

    If you replace all ‘&$this’ with ‘$this’, it will work again everywhere.

  69. This plug-in will only handle four to five images at time for me. I have spent a fair amount of time reading about stackoverflow and about other people that have had this type of problem but I don’t see a common solution. Can you help? Thanks in advance.

  70. Hello,

    First I want to thank you for this awesome plugin. It was the answer to what we needed.

    Now, we’re faced with a fantastic “problem” to have – we need to move the podcasts because the connections to pull, stream, and download is too great for the virtual server to handle.

    So we now have a secondary host for the podcasts, which is great, but what would be really awesome is if it were possible to have the plugin look at the OTHER server.

    I’ve looked at the traditional FTP settings in the wp-config file but am wondering if there is a better way to specifically target your plugin’s access rather than the entire wordpress site?

    Thank you again!

    1. I would suggest you continue to upload them to your main WordPress site so that they’re in your media library, and look into a CDN plugin to serve the uploads from a CDN service instead. This way you won’t need multiple servers which you operate, and will be able to offload a significant amount of resources.

      1. @dd32

        That is a brilliant idea. I quite honestly hadn’t even thought about that as an option.

        That being said, I’m sort of stuck “at the moment” with another server. Is it possible for your plugin to give the potential to access multiple locations? A pseudo piggy-backing of plugin instances? I would certainly be willing to make a donation for the creation of / update to the plugin if it is in the realm of possibility.

        1. Unfortunately I can’t think of the best way for it to work for you.

          The plugin doesn’t support remote connections at all unfortunately, but what you might be able to do, is mount the remote filesystem locally as a network share, and use that as the uploads directory / use the upload URL option in wp-admin to direct it to load it from the other domain.

          one tip, is that if the directory that the files reside in, is within the uploads folder, then the plugin/WordPress doesn’t attempt to copy it elsewhere, so it “should just work” – so just mount the remote filesystem as something like wp-content/uploads/podcasts/ and it might just work..
          You’ll have to give it a try and see what the result is unfortunately as I’m not confident on it.

  71. It is appropriate time to make some plans for the future and it’s time to be happy. I have read this post and if I could I wish to suggest you few interesting things or advice. Perhaps you can write next articles referring to this article. I wish to read more things about it!

  72. If your blog is at the absolute root of the server like mine is, and you click on any of the quick links, the plugin erroneously makes $cwd begin with double slashes. This is because $this->get_root() returns a single slash. (The logic in that function does not always remove the trailing slash). And the logic in main_content assumes that the root is not slash terminated and then concatenates it with another slash (on lines 428 – 429). This is an issue since it causes preg_match (on line 291) to fail when it should succeed and the plugin therefore makes another copy of any files which are already in the upload directory with a new file name. I made the following change to fix this problem.

    get_root() . ‘/’ . ltrim($cwd, ‘/’) ) )
    get_root() . ‘/’ . ltrim($cwd, ‘/’);

    > if ( ! is_readable($cwd) && is_readable( trailingslashit($this->get_root()) . ltrim($cwd, ‘/’) ) )
    > $cwd = trailingslashit($this->get_root()) . ltrim($cwd, ‘/’);

  73. Hi there, I am trying to import an xml file with all of my posts. But it is showing up in red. Does your plugin not support xml files?

    1. The plugin accepts the same set of files which your WordPress install allows for upload, .xml files are not allowed by WordPress for file-attachment purposes due to security issues.
      The plugin can not be used for importing of XML exports either.

  74. After switching hosting companies, when I used Add From Server in my new hosting, it duplicates the files adding the number 1 at the end.

    Want to Add From Server for file “myvideo.mp4” and it duplicates it to “myvideo1.mp4” so now there are 2 files in the folder.

    This wasn’t happening on my previous hosting company. Any ideas how to fix it?

  75. Dear Dion,

    it seems, that this plugin isn’t working any longer on WP 3.6 (the plugin dies after 8 to 10 items), which is right now a real pain in my ass. I would be really pleased if you find some time to do it. Really pleased as in “where do you drink your beer” …

    Yours, hopefully


    1. G’Day Thomas,
      It’s working as expected for me under 3.6.
      If the plugin dies half way through importing batches, import less files, it’s simply your host hitting a time or memory limit – nothing I, or the plugin can do.


  76. Hiya,

    thank you for your quick response an I hope you’re not offended. I thought 100 MB RAM, 30 CPU-Sec should enable the script to provide more than 8 images smaller than 1 MB each.

    It might be a helpful option to divide the whole process in two independant steps, first “harvesting” the files and updating the database, and as a second step resizing the images, because even with the standard resize setting the process dies after about 20 images. It seems to me that the files are processed randomly, so it’s quite tricky to check the unprocessed files for a second or even a third run.


    1. I still blame server resources for your issues. Although they may only be 1MB in size compressed, PHP has to uncompress the image in memory (which can use well over 200MB of ram for a standard 8MP photo in some cases).

      As for splitting the process, although that might help (processing only one image per PHP request) it isn’t something that will ever be supported by this plugin, it’ll always be be limited by server resources to keep the plugin simple.

  77. Hi there,

    I installed the “add from server” plugin yesterday and noticed a lot of duplicated files (mainly resized ones e.g 150×150) this has happened on a few WordPress websites I have transferred servers. Any idea why this is? And how I could prevent this from happening?


    WordPress 3.6

    1. Hi,
      This is completely normal. For every file you upload to WordPress, WordPress will generate some resized versions for use by your theme (Thumbnails, a medium size, a large size, and the original). These various different sized images are used in different spots of your site, the smaller sizes transfer faster over slower connections, and make your site appear faster.

      You can change what size the generated thumbnails are under Settings -> Media in your WordPress dashboard.

  78. OK, it works, but I have still an issue.
    I have set the thumbnail, medium and large dimension of wordpress to 0 and ADD FROM SERVER doesn’t create those, though, it still creates copies of the images crunched at 120x120px
    Ho to avoid this, any code to be modified?

  79. I copied wp-contents/uploads/* from the old WP to the same location in the new WP. The files are distributed in the YYYY-MM structure, and I have years and years of files.

    Is there a way to make the plugin look recursively for files to import in the media library?

  80. Dion, would you have any suggestions on how to proceed to re-attach imported files to their respectives in the media library?


  81. I just updated “add from server” at and it caused the woocommerce checkout to go into continuous load spinner and no-one could purchase. Unfortunately I have had to deactivate the plugin . Is there a fix to this issue

    1. Sorry, don’t know anything about a conflict with woocommerce, seems strange and likely a bug in woocommerce anything.

      No active support or maintenance on this plugin at present though, so sorry, can’t help you.

  82. I just installed this plugin to resolve an ongoing WordPress 3.8.3 “Media Crunching” problem and it works wonderfully! Thank you for this work around. I a now able to upload all my small and large media files seemlessly.

Comments are closed.