1

I am currently running a Wordpress website using php-fpm and nginx and have it using extremely high cpu rates. enter image description here

Here is my www.conf file:

[www]
user = www-data
group = www-data
listen = 127.0.0.1:9000
listen.owner = www-data
listen.group = www-data
pm = ondemand
pm.max_children = 10
pm.start_servers = 20
pm.min_spare_servers = 10
pm.max_spare_servers = 30
pm.process_idle_timeout = 10s
ping.path = /ping
pm.status_path = /status
pm.max_requests = 30
request_terminate_timeout = 20

I am using wp total cache and fastcgi. Any files you know I can find I can show.

My website gets around 800 views a day and it having content added around 5-6 times a day.

2 Answers 2

0

Wordpress uses a lot of CPU on a busy website. Using the CPU isn't a problem - I don't see a problem here. If you're getting very few visitors that CPU may be excessive, but you haven't given us that information.

Caching plugins reduce CPU a little, but you still have to call PHP to render the page. Caching at the web server layer (Nginx) is much faster, for anonymous users, and it can generate pages live for logged in users.

Nginx page caching for anonymous users can significantly reduce CPU usage. I have a tutorial on that here, and there's an Nginx tutorial here. If your site changes frequently you can look at microcaching.

2
  • Sorry, the website gets about 800 views a day and is really slow. I am trying to improve load speeds. Jun 13, 2017 at 0:52
  • Please edit your question to add more information to your question around load, server specifications (CPU and RAM), and top output when the server is busy / not busy. You might check the logs to see if there's anything relevent. 800 users a day is about one every minute, that should be negligible load.
    – Tim
    Jun 13, 2017 at 2:09
0

Check the contents of your Wordpress PHP files, make sure some nasty code hasn't been inserted in them after a compromise. Attackers usually insert the code in all PHP files, so you should only need to check a few random ones in the base directory.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .