07 януари, 2013

Wordpress MU images got broken.

We recently made a copy of a live site for future development purposes.
Everything went fine, we replaced the references to the new domain in database and the site is operating well except that on the sub-sites (the ones that use /files for uploaded content) all images got broken.

After some investigations we found that the /wp-includes/ms-files.php file (the one that operates as a gateway between the image URL and the actual image location) was serving a BOM characters in the beginning of all images and cutting the last three bytes also.
It turned out that while editing the wp-config.php file for the new database credentials, the editor added the BOM character. We removed it and the images got back.

Credits go to this comment: http://core.trac.wordpress.org/ticket/14730#comment:6 from Sergey Biryukov

Няма коментари: