• Hi there,

    I just moved a site from one server to another, changing the URL. The site is working just how expected, with one exception. I cannot upload any files. When I try to do so, I get a notice that the file cannot be moved into the uploads directory.

    The path that it shows to the uploads directory contains the beginning of the old path plus the new path. I have tried to updated the “Store uploads in this folder” media settings, and even tried providing the full URL path to the files, but neither approach is working.

    Is there somewhere else in WP where I can change this setting?

    Many thanks!

Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter Courtney

    (@cmahaney)

    Error: The uploaded file could not be moved to /var/www/vhosts/liveearthfarm.net/httpdocs/wp-content/uploads/2012/10.

    /var/www/ is from the old path….

    Thread Starter Courtney

    (@cmahaney)

    Update:
    sorry, /var/www/vhosts/is from the old path.

    so far I have tried resaving my permalink structure and defining the uploads location in my config file but neither has worked.

    http://www.liveearthfarm.net.

    Make sure the folder is writeable by the web server. Ask your hosts about it if you’re unsure.

    Thread Starter Courtney

    (@cmahaney)

    The permissions on the uploads directory are set to 775.

    Which means the web server can’t write to it if it’s neither the owner nor the group.

    Some hosts run Apache under the nobody user, so you’ll have to set the last digit to 7. There might also be a way to run Apache as your own user, but you’ll have to check with your hosts.

    Thread Starter Courtney

    (@cmahaney)

    I had help moving the database, and will need to help to figure out Apache’s role. Once I’m able to verify that Apache is the owner or part of the group, how can I correct the path to the uploads directory?

    Apache is the web server software. There’s nothing wrong with the path, the problem is that the software isn’t allowed to write files into the folder.

    Thread Starter Courtney

    (@cmahaney)

    I’ve updated the permissions on the uploads folder to 777 because, as you suggested, the webserver was not able to write to it. But I’m still getting the same error as noted above. It appears to be searching for the old absolute path that does not exist anymore.

    Can you SSH into the server and see if that’s the right path?

    Thread Starter Courtney

    (@cmahaney)

    Fonglh, Thank you very much for your help! I changed the permissions for the upload directory, but not for the child directories. After changing the child directories to 777, everything works like a dream now.

    Thank you for taking the time, and being so patient with me!
    I hope that you have a wonderful rest of your weekend!

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Moved site to new server, uploads not working’ is closed to new replies.