Since PHP on Amazon Linux ran with FPM/FastCGI I had to do: sudo systemctl restart php-fpm.service before restarting apache, i.e sudo systemctl restart httpd.service