Support » Fixing WordPress » Moved Site – Updates pointing to wrong server directory

  • I moved a domain from one server to another. The site is working just fine with the exception of doing any updates to core or plugins.

    When I try to update, I get an error:

    Warning: touch() [function.touch]: Unable to create file /home/xxxx/public_html/wp-content/uploads/all-in-one-webmaster.tmp because No such file or directory in /home/xxxx/public_html/wp-admin/includes/file.php on line 179
    
    Warning: unlink(/home/xxxx/public_html/wp-content/uploads/all-in-one-webmaster.tmp) [function.unlink]: No such file or directory in /home/xxxx/public_html/wp-admin/includes/file.php on line 503
    
    Download failed. Destination directory for file streaming does not exist or is not writable.

    Clearly WP is trying to upload to a directory using the old server structure and not the one new. I went into the database and updated the upload_path to the new structure but that doesn’t seem to do anything.

    How can I fix this?

    Thanks

Viewing 9 replies - 1 through 9 (of 9 total)
  • esmi

    (@esmi)

    Forum Moderator

    Did you follow the instructions in Moving_WordPress?

    Yes. I moved about 20 sites. 3 sites have issues and that is because the directory structure of the new server is different from the old one and that structure was not updated in wp.

    esmi

    (@esmi)

    Forum Moderator

    Sorry? Can you clarify what you mean by “the directory structure of the new server is different from the old one”?

    Sorry when I edited the code in the OP it made it unclear what the issue is. But basically, the server path to the upload folder in my old server was:

    /home/abc/public_html/wp-content/uploads

    On the new server it is:

    /home/xyz/public_html/wp-content/uploads

    (Notice the abc vs xyz in the path)

    And when I try to update either the WP code or a plugin, or install a new plugin, it’s still trying to upload the files using the old directory structure – to the … abc … instead of xyz.

    I found one setting in the database that referenced the old directory structure, which I updated. But that didn’t fix it.

    Thanks

    Moderator Dion Hulse

    (@dd32)

    Lead Developer

    WordPress core does not store the file paths anywhere.

    Have you checked to see if you’ve got it defined in wp-config.php perhaps?

    It’s not in wp-config. And I did a search of both the database and all files and can’t find it there. Incredibly strange and frustrating.

    Moderator kmessinger

    (@kmessinger)

    WordPress basically doesn’t pay attention to anything except the root directory when installed there as yours is.

    What does the htaccess file say?

    Reading the error message you posted above, it looks like your “all-in-one-webmaster” plugin might be what’s causing the error. Have you tried disabling it and then doing the update?

    Okay the problem was this setting: WP_TEMP_DIR.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Moved Site – Updates pointing to wrong server directory’ is closed to new replies.