I am using an autoloader
to automatically include all my plugin classes in WordPress. This works fine locally. However, if I put the same code on Amazon EC2 instance, it fails to find the classes. The file paths are correct, I compared the ones on my local installation to the ones on the EC2 instance.
Here is the original code in question: https://wordpress.stackexchange.com/questions/193997/namespaces-in-wordpress-how-do-i-initiate-the-main-class
I have found that same problem, however in my case culprit was the git. Earlier I have created the folder Abc on my development machine and pushed it. Later I renamed the folder to abc but it was not effectively pushed into the git. I have resolved the problem using following git commands:
git reset HEAD
git mv Abc tmp
git mv tmp abc
git commit -am 'Case sensitive folder rename fix'
git push