I have a strange problem with my WordPress installation. I want to move to another domain. I dumped the database and replaced the old domain name with the new one as required. On the new site most of the image paths are dead. They look like this:
Ok, I tried it on my own, and I have found a solution: In the database, there is a table named wp_postmeta. Entrys with the meta_key ‘wp_attached_file’ containing the filename of an attachment in the field ‘meta_value’
The older wordpress installations linked the whole filesystem based path to the image. The new one, v2.7(.1) has filled the field out with the filename only.
With the mysql command
update wp_postmeta set meta_value = replace(meta_value, ‘/var/www/mindland.info/wp-content/’, ”) where meta_key=’_wp_attached_file’
update wp_postmeta set meta_value = replace(meta_value, ‘/var/www/vhosts/mindland.info/httpdocs/wp-content/’, ”) where meta_key=’_wp_attached_file’
I earsed the full file system paths.
My current question is: Why the image links are correct and working on my old domain?
Viewing 1 replies (of 1 total)
The topic ‘strange attachment path after moving to an other server’ is closed to new replies.