As some of you may know, I recently moved some of my web hosting accounts from a Windows hosting to Linux hosting on GoDaddy as their reps recommended. And boy they were right. The performance of WordPress on Linux beats the performance of WordPress on Windows out of the water. This doesn’t mean that Windows hosting is slow, in fact, quite the opposite. Windows is optimized for Microsoft technologies such as ASPX webpages, and those come up very quickly. WordPress is optimized for PHP and apparently runs on a PHP-emulator on the Windows environment. By moving to Linux, WordPress is now free to run on its native land.
After the move was complete, I decided to restore some of the files to the new account using FTP. I just copied over a bunch of HTML files, really. But when I tried to access them using a browser, I kept getting that dreaded 404 (Page Not Found). That’s weird? After checking a number of obvious things I decided to call GoDaddy support.
The guy on the line was quite baffled at this. It wasn’t the Maintenance Mode widget I was using. I could still access the html files in the root. I just couldn’t access the files in the folder where I’d uploaded them. The folder and the file had public read access, so that wasn’t it? The file had spaces in it. Got rid of them, but still to no avail. Even when I moved a file of the folder to the root, I couldn’t access it. So what was it?
Well, it turns out, it was two things:
1. Linux has a case-sensitive file system (d’uh!). So even though the URI I was typing in the browser is supposedly case-insensitive, when the path refers to a file, case-sensitivity matters. Obviously, this isn’t a problem for Windows-based hosting.
2. The folder where the file resides must have a public ‘execute’ permission for its files to be accessible. I found this out, by luck, because GoDaddy’s File Manager has such a note.
So once I set the permission on the folder, and made different copies for the case variations in the filenames of the files I need, my problem was solved.