The first thing you need to try when getting this error is to reset file permissions. But sometimes this doesn’t fix the error.If the site is a migrated site from another hosting, you will need to contact WP Engine support via chat and ask them to “Reset the wp-config.php” file, because your site was migrated from another server, and it may be corrupted.
Be sure to create a copy of that file first, as you may need to add back some configurations that may be lost when the file is reset.