Step-by-step guide to logging WordPress errors on AWS AMI

Solution:
I use this plugin for all WordPress projects.

  • Create a file named php-error.log in the root of your WordPress installation.
  • Follow the plugin instructions after activating it in the dashboard to add a few lines to your wp-config.php.
  • Once set up, PHP errors will automatically be logged to this file and displayed in your WordPress dashboard.