Ajax.php causing high load on the server

If you are running a wordpress blog you might experience a very high number of “hits” to “/wp-admin/admin-ajax.php”. This can cause a very high load on the server, and if you are running your blog on a shared hosting platform, your hosting provider might even disable the script.
To resolve this you can make the changes below to ensure the script exits quickly if no action is supplied with the file request.

Change this
15 define(‘WP_ADMIN’, true);
16
17 require_once(‘../wp-load.php’);
18
19 if ( ! isset( $_REQUEST['action'] ) )
20 die(‘-1′);
21
22 require_once(‘./includes/admin.php’);

To This
15 define(‘WP_ADMIN’, true);
16
17 if ( ! isset( $_REQUEST['action'] ) )
18 die(‘-1′);
19
20 require_once(‘../wp-load.php’);
21
22 require_once(‘./includes/admin.php’);

For more info see this page: http://core.trac.wordpress.org/changeset/15606

or this http://wordpress.org/support/topic/wp-adminadmin-ajaxphp-with-some-27767-hits-on-this-file

WordPress post expire or category change

I have found the following plugins for wordpress that will enable an expiration date on a wordpress post. Some can also change the category, or at least be modified to add that functionality.

None of these are perfect so if you know of a better way to automatically change posts category on a certain date, please comment.

“Auto Delete Post” can, despite the name be setup to change the category instead… without changing any code.

“Post Expirator” can only delete the post, or set the status to Draft, however according to this forum post, a simple code change will enable category change.

“Atropos” Will also only delete the post, however here is modified version that will allow category change.