WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] upload images problem after changing domain (3 posts)

  1. cellobrutos
    Member
    Posted 1 year ago #

    Hi,
    I just changed domains with my wordpress site. It's still on the same server but the domain name has changed.

    My new website is hosted on /new/, the old one on /old/. http://www.mynewdomain.com is pointing correctly to /new/. And I did replace all instances from the old domain from my DB using "Search and replace DB", replacing them with the new domain, as well as added the 2 "define" lines in wp-config for good measure.

    The problem is that when I upload images into posts, they upload to /old/wp-content/uploads, and the website tries to display /new/wp-content/uploads. Of course they don't exist there, so I get a missing file error.
    Why does wordpress still upload to the old repertory, and how do I change that?

    Thanks!
    F.

  2. cellobrutos
    Member
    Posted 1 year ago #

    In fact, after some looking around, I figured that although the domain correctly points to /new/ (i.e. when I put a new index.php file there, it displays that index.php file), but for some reason the servers goes looking for the files in /old/.

    For instance, I can delete the wp-confing file in /new/, the site still displays. But if I delete the one in /old/, it shows an error. This proves the database is not the problem here, because if it was it would fail if I delete the config file in /new/ already.

    So, I really don't know where that problem comes from, and more importantly how to solve it.
    Anyone?
    Thanks!

  3. cellobrutos
    Member
    Posted 1 year ago #

    Ok. Turns out this was an internal error from the server. I reset all settings on the server and I think I solved it...

Topic Closed

This topic has been closed to new replies.

About this Topic