WordPress.org

Ready to get started?Download WordPress

Forums

Problems with upload path after moving site (4 posts)

  1. ladylola
    Member
    Posted 2 years ago #

    I've looked for hours for an answer to my dilemma. I hope someone can help.

    I've moved a site from a subdomain on my site to the main domain on another site (different host). I've changed the upload path, but I'm getting this error when trying to upload a photo:

    Warning: touch() [function.touch]: Unable to create file /home/matilda2/public_html/fruitaddicts/wp-content/uploads/Heather.tmp because No such file or directory in /home/fruitadd/public_html/wp-admin/includes/file.php on line 177

    “Heather.jpg” has failed to upload due to an error
    The uploaded file could not be moved to /home/fruitadd/public_html/wp-content/uploads.

    The path with matilda2 in it is the old path and I can't find where or how to change this.

    Any ideas? Help would be much appreciated.

  2. nitun
    Member
    Posted 2 years ago #

    Check whether the upload directory is moved to new server or not.
    If that folder is present, then give it a permission "755".
    {For Linux use this command:- chmod 777 /wp-content/uploads/ -R }
    Hope this is resolve the issue.
    Note: Also check the owner of that folder.
    Thanks,

  3. ladylola
    Member
    Posted 2 years ago #

    The permissions of /home/fruitadd/public_html/wp-content/uploads are set at 755. Also tried 777 and no luck.

    The folder /home/fruitadd/public_html/wp-content/uploads is present.

    From the error message it knows the upload path is /home/fruitadd/public_html/wp-content/uploads, but why is it trying to create the temp file in the old path before moving it to the current upload path?

    What do you mean by the owner of the folder?

    Many thanks.

    [ Please do not bump, that's not permitted here. ]

  4. ladylola
    Member
    Posted 2 years ago #

    FYI, I got help on another forum.

    They suggested I search through all site files for matilda2. Did that and it was in wp-config.php. The line was:

    define('WP_TEMP_DIR', '/home/matilda2/public_html/fruitaddicts/wp-content/uploads');

    Changed to new path and all working. Hadn't seen that defined in wp-config before so I didn't think to look there, but glad it is fixed.

Topic Closed

This topic has been closed to new replies.

About this Topic