WordPress and HostEurope

In general getting WordPress installed on webspace at HostEurope goes very smoothly – however using the automatic update function or sending notification mails to users caused some problems to me initially.

In order to get both thing to work properly, I put together a very tiny plugin called th23 HostEurope Fix – for use, just download it, extract the zip-file and upload the folder “th23-hosteurope-fix” into the plugin directory of your WordPress installation. Activate like any other plugin via the “Plugins” section in the WordPress admin area, and you are done.

The piece of code sets the temporary upload folder to the correct PHP value and defines a valid sender for notification mails i.e. the admin email specified in the WordPress admin area will be used:

// fix for auto update and auto install of WordPress
putenv('TMPDIR=' . ini_get('upload_tmp_dir'));

// fix for sending mails via WordPress
function th23_hosteurope_fix_mail( $phpmailer ) {
	$phpmailer->Sender = get_option('admin_email');
add_action('phpmailer_init', 'th23_hosteurope_fix_mail');

Maybe this can help somebody else getting WordPress to work properly in a HostEurope environment even quicker than I managed *smiley like*

Leave a Reply