Wordpress not linking properly to unicode image filenames

Posted November 4, 2013 5k views
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?

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.

Submit an Answer
7 answers
Make sure that everything in your WordPress directory is owned by www-data and is a member of the www-data group; by executing:
ls -la /path/to/your/WordPress/installation

If you see root:root sprinkled anywhere in there, remedy it by executing:
sudo chown -R www-data:www-data /path/to/your/WordPress/installation
had already done that but did it again just in case...
oops; I forgot to mention: Restart Apache:
sudo service apache restart
Hmm.. no..
In my case i have apache2 so i did
sudo service apache2 restart

I also installed locale for greek language using apt-get but with no luck.. :-/
Make sure the tables' locales are set to utf8. Also set putty to use utf8.
Well,I think problem might be the database..
Files do reside in the directories with the correct unicode filenames.
By using the url as it shows inside the WP admin i get
/wp-content/uploads/2013/10/Όλα-για-τη-μητέρα-μου.jpg was not found on this server
If I try to type the exact filename the image is shown correctly..
Any ideas?

@Kamal Nasser: I changed the collation to utf8 but with no luck. How can I change the table locale that u are referring to?
by Etel Sverdlov
This tutorial covers installing phpMyAdmin on a LAMP stack. Additionally it includes the steps on how to secure it with the .htaccess file. phpMyAdmin is an free web software to work with MySQL on the web—it provides a convenient visual front end to the MySQL capabilities.