[ad_1]
[ad_2]
My host has a bandwidth limit and only lets me know I'm at risk by shutting down my site once I've crossed it. Has anyone written a wp-cron script (or some better solution) to check our usage and send an alert if we are at risk?
Copyright © 2020 - 2022, Project DMC - WordPress Tutorials for Beginners- All Rights Reserved. Privacy Policy
I don’t think that information is available to the WP installation
[deleted]
The better solution would be to look at why you’re going over the bandwidth and if it’s a low threshold, move hosts.
WordPress has no way of knowing how much bandwidth has been used. This is a hosting issue. Honestly, if your site is getting shut down due to bandwidth usage, move to a better host.
it may be available in server access logs or your host’s control panel. i feed access logs from caddy to goaccess and it shows bandwidth used per day. i assume the access logs from apache and nginx should have similar information.
you can significantly reduce your origin host’s bandwidth use by proxying your site through cloudflare and enabling tiered cache and html cache (for logged out users only).
Wp cron gets triggere only on site visit; please do not rely on wp cron to handle any realtime tracking