I installed a clean WordPress on AWS Elastic Beanstalk (Separate MySQL database on RDS and multiple EC2 instances (AWS Linux 64bit PHP 5.5)). I did some testing and was able to scale the system up to multiple servers and back down – everything was working beautifully. Problems started when I changed permalink settings in WordPress from “Default” to “Post name”, after which I tried to access WordPress Hello world sample page again and got 404 error with an error message: The requested URL /hello-world/ was not found on this server. This only happens sometimes. If you keep clicking on the post link, many times it serves the page right (with the post name correctly in the URL), but sometimes it gives 404. I deleted the environment and started from scratch but got the same result.
Any idea how to fix this? Any other recommendations to consider when setting up auto-scalable WordPress site on AWS?
Thanks for all the help and advice in advance.
Does apache have the permissions to rewrite the .htaccess file? Never used beanstalk but in AWS EC2 mostly this is the solution. In your console try this command