cPanel & WHM Version 98 has been released, and brings a slew of great updates. Take a look at what is included, and then upgrade today!

Create loopback in /etc/hosts file when adding new accouts

WebJIVE shared this idea 2 years ago
Open Discussion

As a web hosting provider, I would like to see a loopback in /etc/hosts created for any domains added during account creation or as an add-on domain (or remove the loopback when the domain is removed) to prevent log files from filling up with wp-cron messages as improved CPU utilization from caching plugins that require the loopback.


-------------------------------------------------------------------


For companies that host a lot of WordPress sites, it seems a big common problem is not having domains in a loopback. This creates problems for caching plugins and the built-in WP cron. All you have to do is view the Apache status and anything matching /wp-cron.php?doing_wp_cron=1546125891.41967606544494628906 (numbers made up) is due to not having a loopback for that domain. We ran across this issue when an update to 76 first appeared.

Not sure what the change was but, WP caching started killing server performance. After digging into this, it was due to not having a loopback for each domain in the hosts file. cPanel support was the one responsible for discovering this! THANK YOU CP SUPPORT!

Would be nice to have a script that runs during account creation, addon domains, account deletiogn, etc. that would add or remove a domain from the hosts file.

127.0.0.1 www.yourdomain.com localhost localhost.localdomain​

This format fixes the loopback issue.

Leave a Comment
 
Attach a file