0

I have wp db exported from domain www.domain1.com. I did manual database import using phpmyadmin to domain www.domain2.com. In database for particular post on new domain I have attachment image link that points to www.domain1.com/wp-content/uploads/2014/01/1.jpg. In front end somehow that link is changed to www.domain2.com/wp-content/uploads/2014/01/1.jpg returning 404 for that image even if db has good link. What can I do to fix that issue? Just to be clear I need that link to point to old domain because I want to keep those images in one place

1 Answer 1

0

As i understand you have used a function like get_template_directory_uri() or a similar one for your image URLs. This way I believe you are only saving relative URL. So domain change is reflected on the URL change. If you want the images to point to the old domain then you should hard code in the template of your new domain although hard-coding is not suggested.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.