I switched the subsite and main site of a multisite. Now, the images are not loading in the media library and posts of the main site. However other subsites are working fine.

The images of the new main site are still available in their old directory:


However, the image urls of the media library and thumbnails are:


To fix this, I run wp search-replace on wp_postmeta and wp_posts to change domain.com/wp-content/uploads/sites/2/ with domain.com/wp-content/uploads/

That didn't help.

  1. Where should the images of the main site be after switching main site? In /wp-content/uploads/ or in wp-content/uploads/sites/2/
  2. Can I or should I manually move images from /wp-content/uploads/sites/2/ into the appropriate year/month folder in wp-content/uploads/ ?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.