Jun 052013
 

I have been investigating the scheduled tasks within WordPress, otherwise known as a Cron Job for one of our products J2Bloggy.
By default WordPress checks for scheduled tasks every time a page loads, which includes checking for new versions of WordPress core code, plugins and themes installed on the site, as well as any pending posts awaiting publishing. When hosting a lot of WordPress sites it seems well documented (here and here are two such examples) to disable the automatic cron job and set up a custom task to check the scheduled tasks less frequently by adding the following line to wp-config.php:

define('DISABLE_WP_CRON', true);

and using the cPanel or the Scheduled Cron Jobs page on the server to execute the scheduled task yourself.
Taking this a step further you could implement a plugin or change the functions.php file to remove a number of default actions WordPress implements to stop the WordPress cron job checking if the core code, plugins or themes need updating, a useful reason for this is explained here

// stop calling the function to check the core version
remove_action( 'wp_version_check', 'wp_version_check' );
remove_action( 'admin_init', '_maybe_update_core' );

// stop calling the function to update the plugins
remove_action( 'wp_update_plugins', 'wp_update_plugins' );
remove_action( 'admin_init', '_maybe_update_plugins' );

// stop calling the function to update the themes
remove_action( 'wp_update_themes', 'wp_update_themes' );
remove_action( 'admin_init', '_maybe_update_themes' );

I have not yet tested this process other than to disable all cron jobs, but believe that it is important change that needs to take place so that some scheduled tasks do happen, for example publishing scheduled posts or pages.

May 292013
 

I have been working recently with the authentication process that happens during a WordPress XML-RPC remote login, with the intention to log into a J2Bloggy site using the standard WordPress iOS app and authenticating the user with the j2e user credentials.

A very helpful blog was this one http://ben.lobaugh.net/blog/7175/wordpress-replace-built-in-user-authentication

I successfully added the necessary code to our plug-in and it works! The one problem is that it is only useful for J2e users that do not use Shibboleth to log in to J2e 🙁