Question

Here's my problem :

I switched a Wordpress site from HostGator to MediaTemple. Since the domain name stays the same, I backed up and re-imported the database, downloaded and re-uploaded the site content without issues.

The first time, everything worked well except that in place of the images, I could only see question marks. Opening the image in a new tab would show "Not found". I went in the FTP and realized that the file names were in french and with accents in them like "é" and "à", and that in the process of downloading the files to my Mac (Using Coda) and re-uploading them in the server, the accents were all replaced by weird characters...

  • I tried to manually rename them, it did not work
  • I tried to do it using different Ftp apps, did not work
  • I tried using windows to do it, did not work

I managed by playing in Coda's preferences to change the encoding and to re-upload the files to the server while keeping all the accents but it still didn't work...

Database is in UTF-8, and I tried multiple collation like UTF8_bin and general_ci but it didn't work either...

I am pretty sure it is a character encoding issue since there is 1 or 2 images working on the site and they have no accents in their names but I really don't know where to look anymore.

Switched multiple Wordpress websites and never had this problem before, could somebody point me in the right direction please ?

Was it helpful?

Solution

In wordpress all the links are saved into the database and are not hard coded in the html files. So when you're shifting your website from one host to another, you must find and replace the previous host's links with the new host's links in the database file exported from the previous host before importing it into the new host.

Go to the following links for details.
How to Move WordPress From Local Server to Live Site
Moving WordPress - Wordpress Codex

Wish you good luck.

OTHER TIPS

Ask your new hosting service to chown your files to your new account, which may be solve the problem.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top