Try New Technology

WordPress site loading slow / high server load

by on Jan.13, 2014, under Techie

Recently noticed a in-dev WordPress sites I work on calling “POST /wp-cron.php?doing_wp_cron” a lot and in turn the server load jumps up (15.0 at times!). After a lot of digging around I decided it wasn’t something like WP Super Cache glitching since they don’t use that Plug-in.

After a lot of Google searching I found out how to just disable the wp-cron.php from running every time a page is called. As I understand this is NOT something you want to do if the WordPress is updated a lot as a blog site, but since this one isn’t I figured setting it to manually run wp-cron.php every 6 hours might be best.

A quick synapse of what the link above will show:

edit the wp-config.php and add “define(‘DISABLE_WP_CRON’, ‘true’);” under the following line:

/** The Database Collate type. Don't change this if in doubt. */
define('DB_COLLATE', '');

Then setup a cronjob via cPanel (or whatever Control Panel you use; even crontab if need be) to run the following (every 6 hours should be good):

php -q /home/username/public_html/wp-cron.php

NOTE: Of course adjust the path accordingly.

As a side note. I noted that at time the page would load slow for the first time (since the site is in DEV not a lot of traffic – well aside from BOTS which create a lot of HTTP lately) and sometimes would be so slow it would create a “lfd on server.domain.ext: Suspicious process running under user username” e-mail telling me that different .php files (index.php, admin-ajax.php, etc.) were running for too long.


Comments are closed.

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...