• I’m setting up a WP site on a Virtualbox VM with Ubuntu Server 9.10. Everything appears to be working locally and remotely except for images I upload using the web interface. I can see that the images have uploaded to the folder on the web server, but they do not display because the image links have localhost in the string.

    I’ve checked the Settings-general area and the URL listed there is the FQDN for our network. Where is the setting for me to change the default image path?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Unfortunately, there is no setting to change to fix this. WordPress stores the full path to the image in the “postmeta” table in a record with the “meta_key” of _wp_attached_file. Depending on how many images you have, there are different solutions:

    1. Only a few images: Open up phpmyadmin – if available – and edit the paths by hand.

    2. Import and Export: Thankfully, WordPress has given us a powerful tools which allows us to import and export data – including attachments – between servers. I usually develop locally and would be lost without this feature. It lives in the WordPress Administration Panels under “Tools”.

    3. Find and Replace: Give this script a try: http://spectacu.la/search-and-replace-for-wordpress-databases/ . I’ve never used it, but seems to do what you need it to.

    Best wishes,
    -Mike

    Yeah, you’ve hit upon something rather peculiar about WordPress. WP will dynamically generate URL for most everything… but not images.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Image path defaulting to localhost’ is closed to new replies.