Symptoms

A WordPress installation or update task is failing with the following output:

Task name   APS application 'WordPress', id 106, instance 6185 : executing configuration script
Last execution output   Script execution failed: executing 'env 'WEB__wp-content_DIR=/usr/local/pem/vhosts/109521/webspace/siteapps/6185/htdocs wp-content''WEB__wp-config.php_DIR=/usr/local/pem/vhosts/109521/webspace/siteapps/6185/htdocs/wp-config.php' 'WEB__tmp_DIR=/usr /local/pem/vhosts/109521/webspace/siteapps/6185/htdocs/tmp' 'WEB__blogs_media_DIR=/usr/local/pem/vhosts/109521/webspace/siteapps /6185/htdocs/blogs/media' 'WEB___DIR=/usr/local/pem/vhosts/109521/webspace/siteapps/6185/htdocs' 'SETTINGS_title=WohnSinn' 'SETTINGS_locale=de-DE' 'SETTINGS_admin_password=password' 'SETTINGS_admin_name=admin' 'SETTINGS_admin_email=someone@domain.tld' 'SERVICE_ID=wordpress' 'PHP_VERSION=5.2.17' 'DB_main_VERSION=5.0.83' 'DB_main_TYPE=mysql' 'DB_main_PASSWORD=password' 'DB_main_NAME=mywpdb' 'DB_main_LOGIN=mylogin' 'DB_main_HOST=192.168.1.23' 'BASE_URL_SCHEME=http' 'BASE_URL_PATH=/' 'BASE_URL_HOST=domain.tld' 'BASE_IP_ADDRESS=64.131.89.6' /usr/bin/php! -cgi -d open_basedir= -q configure 'configure'' for APS application instance with id 6185 returned value '1' with output 

'Unable to execute SQL statement (UPDATE `wp_options` SET `option_value`='http://domain.tld' WHERE `blog_id`=0 AND `option_name`='siteurl'): Unknown column 'blog_id' in 'where clause'' and errors ''.

Cause

The column blog_id is missing in the wp_options table of the Wordpress database.

Resolution

  1. Find out the database credentials from the task parameter Last execution output.
  2. Log in to the MySQL server with shared database hosting and update the database in question:

    mysql> USE mywpdb
    Reading table information for completion of table and column names
    You can turn off this feature to get a quicker startup with -A
    
    Database changed
    
    mysql> ALTER TABLE wp_options ADD COLUMN blog_id int(11) NOT NULL default '0';
    Query OK, 159 rows affected (0.02 sec)
    Records: 159  Duplicates: 0  Warnings: 0
    

Internal content