Viewing 3 replies - 1 through 3 (of 3 total)
  • I recently migrated my wordpress site from a single server Apache instance to a 2 tier NginX server farm, consisting of a File/Mysql server and 2 nginx/php5-fpm servers.

    On the Apache instance I am able to upload media from the media page in wp-admin. On the nginx instance I am able to upload to most of my sites but not to one particular wordpress website.

    When I select my file to upload I get the following error:

    “myfile.jpg” has failed to upload due to an error
    Unable to create directory uploads/2015/11. Is its parent directory writable by the server?

    1. I have tried the chg wp-content folder to 777 then back to 755.
    2. I have tried changing my permalink in Settings from one setting to another and then back.
    3. I have checked Settings / Media and find I am pointing to /…/website.com/wp-content/uploads
    4. I have checked my permissions from top to bottom for this website and they match the other nginx sites that do work. (folders = 755 / files = 644)
    5. I have deactivated all plugins to see if any of the plugins I use was the culprit. No change.

    I need some other ideas and hopefully the correct one to fix this.

    I am not sure how the configuration changed to add in two input fields that were present in the Settings / Media Settings page.

    The fields were called
    “Store uploads in this folder”
    and
    “Full URL path to files”

    the “Store uploads in this folder” input block had the Absolute path to the uploads folder
    “/var/www/webcontent/websites/website.com/wp-content/uploads”

    Below the two fields was a note stated:
    “Configuring this is optional. By default, it should be blank”
    I should have paid attention.

    Emptying that input box and saving the changes fixed my issue.

    Craig Hesser

    (@bulgariarealtor)

    Stephen, thank-you, thank-you, thank-you!!!

    I had nothing in the second box, but I had the full path in the – “Store uploads in this folder” box. I changed that to the recommended setting “/wp-content/uploads” and the problem is resolved.

    The interesting part is that after I made the change and saved it, those two fields are no longer visible!

    I have seen this problem before, particularly when there are version updates to or new installs of the older WP themes – 2010, 2011, 2012. I tried a new WP 4.3.1 install, I tried a new theme install (delete the old theme that was automatically updated and install it a second time clean from WP), nothing made any difference prior to your change.

    It MAY be that not checking the “Organize my uploads into month- and year-based folders” box would make a difference. But I am not willing to experiment at this point, I have lost too much time already. This is a 2010-vintage website that I am rebuilding completely.

    Link: https://italyall.com/ (but you can’t get into the admin area.)

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘can't upload media’ is closed to new replies.