0

I recently moved a multi site wordpress installation to another development server. I did this by exporting the DB to SQL, importing it on the new server, changing the wp-config DB login data and DOMAIN_CURRENT_SITE to localhost and running the search and replace script to update the server address (was some IP, now is localhost). Everything seems to work fine now, except for featured images of pages. They are not displayed.

The problem seems to affect only sub-sites and not the main site. The main site, however, stores its uploads (featured images are among them) in wp-content/uploads, whereas the other sites store these in wp-content/blogs.dir. I did not change the files in there, of course and don't understand why the images don't display. All the other images do.

When I see the broken path of the image, it looks like this:

http://localhost/cze/files/2012/11/profile.jpg

which is strange, becouse the image is on the specified path, I just checked. I'm really puzzled.

For the record, uploading new images is fine and when these are uploaded and used as new featured images, it works fine. I would however like to avoid having to go through all the sites and changing all the featured images.

I have not edited anything else (.htaccess for example).

Any ideas on what could be causing this?

Thanks, Ondrej

Community
  • 1
  • 1
Ondrej
  • 1,610
  • 3
  • 19
  • 34
  • So you copied over all the wp-content files? Find the URL of one of the problem images by checking the page source. Then try to access it directly in a browser. What does the URL look like, and what do you see? – Matt Gibson Jul 22 '14 at 12:33
  • Could have written that -- I updated the question to include this. – Ondrej Jul 22 '14 at 12:53
  • So, when you browse to `http://localhost/cze/files/2012/11/profile.jpg`, you see the image as expected? Or something else? And does your problem happen if you try in another browser (just trying to eliminate possible caching issues, etc.) – Matt Gibson Jul 22 '14 at 13:05
  • nope. When I browse to this url, the image does not display. But it is in the corresponding directory on my drive – Ondrej Jul 22 '14 at 13:23
  • What *does* display? Does using your browser debugging tools give you some idea of the response you're getting back? (Could the files simply not be readable by the web server? Have you checked the file permissions?) – Matt Gibson Jul 22 '14 at 13:36
  • I get an image with broken link in the code, so nothing gets displayed. Strangely enough, some pages display the feature image allright and some dont. Can this be affected maybe by some error in htaccess? Just asking, since I never really needed to get into that. – Ondrej Jul 23 '14 at 05:57

1 Answers1

0

I am sure there are still some old URLs in the database. Please make sure you replaced the home, site_url and fileupload_url like codex mentioned: http://codex.wordpress.org/Moving_WordPress#Moving_WordPress_Multisite

Also, open the mysql file in a text editor and look for the old url using find option. Do you see any?

  • I did check that. The database doesn't contain the old address anywhere and all the siteurl, home and fileupload_url have the right values. – Ondrej Jul 23 '14 at 05:56