I have latest WordPress install on Digital Ocean, which I set up using Laravel Forge. It is PHP 7.1 on Ubuntu, running on Nginx.

Pages load fast but adding comments to articles is terribly slow, about 50 seconds or more.

I traced it in the code, first 8-10 seconds is Akismet checking the comment for spam, then another 10 seconds is gethostbyaddr() in wp_notify_postauthor() function in pluggable.php, and the rest is $phpmailer->Send() in wp_mail.

I am a bit confused, as I have another WP Site on similar config and all works smoothly. I even installed SSL, tried with all plugins disabled and tried different theme but it is the same. The site is https://alfanela.cz, any help will be greatly appreciated

Read more here: WordPress on Nginx slow when adding comments – gethostbyaddr, wp_mail


If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Wordpress related questions and answers: