I moved my wordpress website from my old server to my new. Everything works, except that every uploaded files (PDFs for example) with accents (é,à, and so on) in the file name got their URL broken. So I would have to rename every files with accents, and change my links that are pointing to these files.
The images are showing though. It really seems to be only affecting files with accents in the filename.
Any solutions for this? I just wanted to move the wordpress website to my new server. It worked, but I would have to rename all these uploaded files.
Thanks!
I had such a problem, i dont have 100% correct answer but i want help you.
I remember it was problem with ftp program (i dont remember, maybe winscp?)
anyway this program does not interact with server and changed accent characters. You can try do it with other program or from server shell.
Second thing, we known which character is wrong and my friend wrote plugin to change characters but if your have you problem from other side (char to accent) this cant work...
Find where is your problem, possible you can fix it with plugin like this: https://wordpress.org/plugins/clean-image-filenames/
Last important thing - check whether your database use correct encoding
Sorry for english ;)
Related
This is the weirdest problem I've never met on PHP (I use it since 10 years) and that's why I'm writing this message. PHP version is 7.2.
I think it's not important but i use CodeIgniter, my problem is before, in the first index.php. All works in local, but when I put my code on a server (which is a shared server unfortunately), the behavior is :
if, in the beginning of index.php, there is an image using data:image with base64, the page displays
if not, i have a blank page
I just can't understand. I noticed this when i added a phpinfo at the beginning, suddenly my page displayed because the logo of phpinfo uses this kind of picture.
I made many many many tests, and the only way to make it work is using a data:image base64 before (and by the way, just before I use "" to put it in display none and it still works...). Using a link for the image doesn't work.
I have no error, nowhere.
I just want to know if someone has an idea about what is happening here ?
Thank you so much ! (Sorry I'm not an english native person)
I think you are using windows machine for local development. And your server is Linux based...
Linux server is fully case sensitive. Please check folder,files name is correct or not..
If a folder is ../View/123.jpg
Then. The src="../VIEW/123.JPG" will work on windows machime. But error in linux server..
I have transferred a website from 1 server to another. Everything went well except that it now shows \r\n everywhere on the site instead of changing into <br/>.
The version of PHP so that should work the same. What could be the problem? Have searched in the web but couldn't find a solution.
Although, I haven't experienced such a problem I can give you some clues. It appears to me as if the symbols have been replaced with http://php.net/manual/en/function.nl2br.php.
My solution will be to edit all the applicable files with Find All and replace all the \r\n parts with <br/>. Of course, have a spare copy of the file just in case.
Don't know why, but the solution was to not export the database via PhpMyAdmin. Instead I exported the database through the DirectAdmin panel of the hosting provider and imported that one and the problem was gone.
Hope this helps people dealing with this problem!
I was working on a PHP file which is about 500 KB in size on Netbeans 7.0.1 on Windows 7. Unfortunately, the laptop powered off suddenly at the same moment while I'm saving the file after some edits (Bad luck, I know). When I tried to open the file again it shows just blank spaces without any codes although the file size is still 500 KB!
Is there anyway to recover this file (is not strange that it still has the same size ?). Does netbeans save any temp files or backups for the files in that case?
Any help would be much appreciated.
Click on the history tab, it should show you the history of the file:
worst case, check your remote FTP host, it should still be right up there...
I had same thing. Been working on a project when PC rebooted. Few files which were saved lately and all their history got zero filled.
First thing, you should check history tab (it's on editor's toolbar, which is under tabs by default. if it's not not, you can enable it under View ->show editor toolbar), maybe you're luckier than I am. In case your history got zero filled too, you could try some program to recover files, R-Studio for example. Either by trying to recover earlier versions of history or files or you could use its inbuilt viewer to search for pieces of files. I know it's tedious and long process but I actually got few files back this way.
Lesson should be learned: Always store your files on remote host for back up purposes.
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 ?
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.
Ask your new hosting service to chown your files to your new account, which may be solve the problem.
Probably, this is another noob question, but I really do not get along on my own:
I developed a website, where a chart shall be included, using the google-chart-tool. Therefore, a php-file is embedded in the HTML, which opens a json-file containing the chart data. Under xammp on my home machine everything works fine, but on the webserver it does not.
The php lives in the same folder like the HTML, the json is in another folder. I thought maybe this is a path problem and tried with absolute paths on the webserver, but that does not change the situation.
Maybe the paths are not the problem? Does anybody have an idea on this?
Thanks in advance!
Sadly, I can not give you a url or anything, since the site will be "partly business" and my boss is kind of a secret keeper ;-)
I will add the link when its done, though...