I’m recently getting random spikes in load and cpu at least once in a few days, which slow down and mostly crashes the wordpress site. My question is that how can I precisely detect what causes this. I’ve tried several things like increasing wp memory limit but without knowing the cause of this, it is meaningless.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi there,
Random spikes on WordPress usually come from traffic bursts (legit or bots), heavy plugins, or scheduled jobs like backups or cron. Bumping memory is one way to go but you could also check what actually is going on on the server itself as well.
First step is to check your Apache/access logs around the spike. I put together a small script to make that easier: quick_access_logs_summary. It’ll show if a specific path, plugin, or bot is hammering your site.
Also worth:
Run top/htop during a spike to see which process is heavy.
Check crontab -l and /etc/cron.* for scheduled jobs.
Put Cloudflare (or another CDN/proxy) in front of your site to absorb junk traffic and cache static content.
Delete any plugins and themes that you are not actually using: https://www.digitalocean.com/community/questions/how-to-secure-wordpress-without-a-security-plugin
Once you know if it’s traffic or local jobs, you can tune accordingly.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.