1

I have a WordPress site with daily 25K visitor, +3K post and +22K comment. on a VPS with 2 CPU and 8 GB Ram with SSD disk, Centos installed. it was stable but from 20 days I found a very high CPU load and the website has become slow and many visitors got website down message.

When I am trying to troubleshot using "top", "glances" I found too many child process with "/usr/bin/php-cgi" and this process eating CPU and make server freeze and also I found "%us" very high and this is from "top": https://pastebin.com/wiYtcWAz

After search I found many tips speak about change to php-fpm instead of Apache and I did but this not help and the load covert from "/usr/bin/php-cgi" to "php-fpm: pool" and this is from "glances": https://pastebin.com/BYiSGjkY

So I decided to move on to a larger server for test and I put it on a dedicated server with 8 CPU cores and 32 GB Ram with NVME SSD disk and the problem has not been solved and the same load still there. After many searches I found many opinions speak about this is WordPress PHP files issues so I started working on it and I did the following as a attempts:

  1. Deactivate all plugins.
  2. Change the theme and used the default theme.
  3. Optimize the database and clean all unused metadata.
  4. Export and Import to new installed WordPress.
  5. delete all comments.
  6. delete all media files.

and the problem not solved. also I am take a look to cache so I use "wp-rocket" as a WordPress cache plugin with opcache php cache also I am tried "redis and memcached" and I still have the problem.

AndrewL64
  • 179
  • 18
Ahmad
  • 11
  • 3
  • 1
    It's likely to be closed like your last question on the same topic. You have to figure out what's going on with troubleshooting steps found elsewhere. WordPress and PHP has excellent debugging tools. Even if the issue is in MySQL, it is possible to get to the bottom of the issue. You have to ask specific questions to get an answer here. – Pothi Kalimuthu Jul 02 '19 at 12:28
  • You haven't given us any information to help you - top, iotop, etc. If this is urgent you might be better off hiring a professional to resolve this for you. If it's not then please include diagnostic information in your question so we can start to help you. I would start by googling something like "how to resolve wordpress high CPU issue". – Tim Jul 04 '19 at 18:37
  • If it's just load then you should look at caching static pages ideally at the web server level for anonymous users. For that you could read my [Wordpress / Nginx optimization guide](https://www.photographerstechsupport.com/tutorials/hosting-wordpress-on-aws-tutorial-part-4-wordpress-website-optimization/). – Tim Jul 04 '19 at 18:37
  • Hi all, this issue resolved when i am used WAF, i think it was some attack maybe DDos – Ahmad Jul 06 '19 at 10:48

0 Answers0