Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Uploading files to WordPress

edited March 2007 in MarsEdit
I'm evaluating MarsEdit. As a test, I tried to upload a file to my WordPress blog. The upload failed, giving this message:

"Upload File Error
"Can't upload file for [name of blog] because the server reported an error: Could not write file [path and file name]."

I can upload via a separate FTP client (Transmit), but it would be nice not to have to do that. I've had the same problem with another blogging app (ecto) and with the WordPress interface running in a browser.

Does anyone have any idea why I'm having this problem? Obviously it's not just a MarsEdit problem. Can anyone suggest a solution?


  • Hi Craig - I'm not sure but if you can send me a copy of the "RPC Log" (from the Window menu) then it might help figure it out. Send it to support at Thanks!

    As I understand it, the WordPress upload depends on a specific directory being designated as "the uploads directory." Usually problems as you describe are because the web server (running WordPress) doesn't have permission to write to the specified directory.

  • Thanks, Daniel. I've sent the RPC Console Log to you.

    The uploads folder has wide open permissions. It is contained in a folder contained in another folder that is password protected. Earlier I tried using the WordPress browser interface to upload after removing the password protection, but it didn't work in that case either.
  • Thanks for sending the RPC log. Indeed it indicates a failure from the server with a "500" error code, which means "Internal Server Error." Not super informative, I'm afraid.

    I'm going to be doing some testing soon on my own WordPress blog with the upload functionality. Until now, mainly because I like to keep my images and "other files" in separate directories, I haven't used the WordPress upload function. But I will set mine up to do at least do some testing, and maybe that will help me better guess what might be going wrong here.

    In the mean time, since it does sound like the problem extends beyond MarsEdit, maybe somebody with more experience will chime in.

  • I just tested uploading to Wordpress from MarsEdit and it worked "just fine".

    I always forget that I need to leave the "path" information as a blank, not the default "." that appears.

    Anyway - latest MarsEdit (updated this morning) and latest WordPress.

    I don't think it's a MarsEdit problem at all.
  • face said:
    I don't think it's a MarsEdit problem at all.
    I don't think it is either. I just hope someone using the forum has an idea for fixing it. Thanks for testing it for me.

    I tried leaving the path field blank (as you did) but got the same result.
  • craig: somebody suggested to me off-line that in particular the upload folder for WordPress should be "755" permissions. I'm not sure if this is a situation where WordPress maybe checks to make sure it's exactly that? Or just a good habit. But maybe it would be worth confirming that the directory is exactly that:

    chmod 755 ./myUploadDirName
  • It was set to 755. As a test, I changed permissions on that folder to 777, and I was able to upload.

    I don't think I ought to leave the folder's permissions at 777 (my Web host definitely does not think I should), but perhaps this provides some kind of clue.
  • Yes - good clues. I wonder if the "group" for your directory is set to some "web server" type process? If so you could try setting the perms to 775, which gives full permissions to the group owner as well as yourself.
  • I tried 775 (at your suggestion, thanks) and got the same error message.

    I recall (but perhaps incorrectly -- it has been quite a few months) someone with my hosting service telling me that I need to be on the LAN to be part of a group given special permissions. I think the reason he gave was that I'm hosted on a shared server. Does that make sense?
  • craigc: it doesn't really make sense all by itself. I think the condensation of your problem - the question you need answered by your hosting service is:

    "How can I configure a certain directory so that a PHP web application has write access to it?"

    Different hosts handle it differently. For instance on Pair there is a technology called "CGI-Wrap" that lets the PHP process essentially run as the owner.

    Hopefully that will be enough to get some more info from your host.

  • I have this problem from time to time. It always seems to be in the evening and with large files. I I wait until the next day, it someitimes help.

    --- Could be it is slower on the interenet
    --- or it come be Wordpress made a change, then fixed it by morning

    BUT, if you solve what it really is, let me know. For me it doesn't seem to be a chmong thing since it works most of the time.
    lm 27
  • Daniel, I wrote to my Web host last week and am waiting for a response.

    Librarymonkey27, nice to "hear" you again. I was wondering last week what had become of you after you stopped posting to the Nisus forums. My upload problem is a consistent one, not an on-again, off-again thing like the one you experience, so I suspect we're dealing with different issues. But I'll post any worthwhile answers that I get.
  • hello...

    not that it might solve your problem but I have a couple questions

    1) what is your operating system and computer

    2) is your blog at or is it on your own server (or seperate server)

    I just noticed there is a 1.1.4 version avaiable, perhaps that will be the fix
  • 1) I have a PowerBook G4 running Mac OS X 10.4.8.

    2) The blog is on a separate server.

    3) I downloaded and installed MarsEdit 1.1.4, but the problem is the same.

    I'm still waiting to hear from my Web host.
  • I am guessing most of the people reading here, like myself, can not help just because we aren't in the same situation

    me for example intel osx 10.4.9 (as of a couple hours ago), but posting to the site...

    I would guess if you can ftp up to the site, then you can use MarsEdit, but you need to calibrate to the site ---as you said from your web host

    good luck --- go Nisus Pro ;-)
  • My Web host says it is necessary to change the "other" permissions on the uploads folder to 7. They also say it is okay with them for me to do that, so I guess that resolves the problem.
  • You are not alone, craigc. I have changed the permissions on a test directory to 777 and yet it does not work even though I cane use it from other applications as well as FTP clients. I think the error is in Mars......

    Best regards/Bengt Falke
  • falke: It sounds like the permissions problem was solved for craigc by changing the permissions to 777, so I don't think he's seeing the same issues as you are. (Note: Setting permissions to 777 is not generally recommended, but on some hosts, it's the only option they support for giving the web server write access to the directory).

    If you want to paste or send me your RPC Console when you attempt to upload files, I might be able to help. The problem here is that ISPs tend to put restrictions on what users can do with "xmlrpc.php" and "POST" methods. So it's not safe to say "I can ftp to the directory so it's probably MarsEdit."

    But it *could* be MarsEdit, so let's try to get to the bottom of it.

  • edited March 2007
    THanks for your quick reply, Daniel. Can you please indicate to me where I can find the RPC console? Is it maybe the xmlrpc.php-file?

    Edit.... I found it:
    RPC message sent: 2007-03-16 17:51:54 +0100
    Method name: metaWeblog.newMediaObject
    RPC reply received: 2007-03-16 17:51:54 +0100
    Method name: metaWeblog.newMediaObject
    Status code: 200
    Succeeded: NO
    --Fault Error--
    Fault code: 500
    Fault string: Could not write file testfalke.jpg
    Request text:
    <?xml version="1.0" encoding="utf-8"?>








    Response text:
    <?xml version="1.0"?>


    Could not write file testfalke.jpg

  • Hi falke - so this is definitely looking to me like a server-side problem. The fact that WordPress is getting as far as *trying* to write the file, but then failing, makes me think the directory is either not configured correctly, or your server has a permissions policy that "prevents PHP/Web Server from writing to the disk." You might ask them about this.

    Out of curiosity, what is the exact setting of your "Store uploads in this folder:" field in the WordPress Options -> Miscellaneous section on your WordPress admin?

    Mine is "wp-content/downloads".

  • It is wp-content

    What shall I write in the path-field in the images & files dialogue? test, test/ or that is not totally clear to me

  • falke: on some systems, the path is used to specify a specific subfolder, but that doesn't work no WordPress. WordPress just takes the path field and prepends it to the file name, and it stores the files by date inside your upload folder.

    I suspect the problem is that you are specifying "wp-content" alone as the upload folder. Try choosing something like "wp-content/uploads" and then go make sure that directory "uploads" exists in the directory on your server, and has the expected permissions.

    I noticed that WordPress is bad about returning errors for this problem, so I modified the xlmrpc.php from the latest version (2.1.2) and I will be submitting this to them to hopefully include in future versions. If you're feeling adventurous, you can download and copy this updated xmlrpc.php file:

    To your wordpress installation. It will cause the failure "Could not write file" to have a more meaningful error come along with it.

  • Well, I have changed the setings in Wordpress to wp-content/uploads

    I have changed the rights for wp-content, wp-content/uploads, wp-content/uploads/test to 777

    but still no success.

  • The only other things I can suggest at this point are to get in touch with your host to see what they think about the errors, and to possibly try the updated xmlrpc.php I linked to. Sorry, the solution is not obvious here because the failure seems to be happening inside your server.

  • OK I cracked it.....

    In the setting I had this checkbox set:

    Organize my uploads into month- and year-based folders
    and as those folders didn't exist WP did only create the year folder but did not then had the rights to create the month and date folders.... simple but annoying!
    So when I unchecked that box and had the set the rights on the upload folder to 777 all worked. I will try to reduce those rights.....

    Thanks for your help, Daniel!

  • Great news! Thanks for letting us know the final outcome.
Sign In or Register to comment.