Question

Wordpress not linking properly to unicode image filenames

  • Posted November 4, 2013

Hi, I just migrated my Wordpress site to DO. I used an Ubuntu with preconfigured wordpress and transfered my files and my DB to the VPS. So far so good. I have this strange behavior: Filenames with unicode names (greek) do not link properly on website and eventually images do not show on site. Here are the facts:

  • ssh into vps and ls shows filenames as ???.jpg
  • performing ls | more shows filenames correclty! (So i assume that the original naming was not lost when transferring them)
  • checking images from wordpress admin shows them as broken links.(they do not show)
  • logging into to phpmyadmin and checking the corresponding tables (postmeta) shows the names in unicode.
  • also, uploading one new image with unicode (greek) filename works OK… Any ideas?
Subscribe
Share

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Check out <a href=“https://www.digitalocean.com/community/articles/how-to-install-and-secure-phpmyadmin-on-ubuntu-12-04”>How To Install and Secure phpMyAdmin on Ubuntu 12.04</a>.

Well,I think problem might be the database… <br>Files do reside in the directories with the correct unicode filenames. <br>By using the url as it shows inside the WP admin i get <br>/wp-content/uploads/2013/10/Όλα-για-τη-μητέρα-μου.jpg was not found on this server <br>If I try to type the exact filename the image is shown correctly… <br>Any ideas? <br> <br>@Kamal Nasser: I changed the collation to utf8 but with no luck. How can I change the table locale that u are referring to?

Make sure the tables’ locales are set to utf8. Also set putty to use utf8.

Hmm… no… <br>In my case i have apache2 so i did <br>sudo service apache2 restart <br> <br>I also installed locale for greek language using apt-get but with no luck… :-/ <br>

oops; I forgot to mention: Restart Apache: <br><pre>sudo service apache restart</pre>

Hi, <br>had already done that but did it again just in case…

Make sure that everything in your WordPress directory is owned by <code>www-data</code> and is a member of the <code>www-data</code> group; by executing: <br><pre>ls -la /path/to/your/WordPress/installation</pre> <br>If you see <code>root:root</code> sprinkled anywhere in there, remedy it by executing: <br><pre>sudo chown -R www-data:www-data /path/to/your/WordPress/installation</pre>