Title: WordPress database error Duplicate column name &#8216;error&#8217;
Last modified: February 19, 2017

---

# WordPress database error Duplicate column name ‘error’

 *  Resolved [patrikx](https://wordpress.org/support/users/patrikx/)
 * (@patrikx)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/wordpress-database-error-duplicate-column-name-error/)
 * Hello,
 * after upgrading to version 1.8.0 I get:
 * [Sat Feb 18 16:31:27.140890 2017] [:error] [pid 10323] [client 77.234.247.102:
   22971] WordPress database error Duplicate column name ‘error’ for query ALTER
   TABLE `wp_wpml_mails` ADD COLUMN `error` VARCHAR(400) NULL DEFAULT ” AFTER `attachments`;/*
   From [talentedteacherjobs.co.uk/wp-admin/admin-ajax.php] in [/nas/content/live/
   ttjobs/wp-content/plugins/wp-mail-logging/WPML_Plugin.php:124] */ made by require_once(‘
   wp-load.php’), require_once(‘wp-config.php’), require_once(‘wp-settings.php’),
   include_once(‘/plugins/wp-mail-logging/wp-mail-logging.php’), No3x\\WPML\\WPML_Init-
   >init, No3x\\WPML\\WPML_Plugin->upgrade, referer:

Viewing 13 replies - 1 through 13 (of 13 total)

 *  [ngrudev](https://wordpress.org/support/users/ngrudev/)
 * (@ngrudev)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/wordpress-database-error-duplicate-column-name-error/#post-8822863)
 * I have the same issue
 *  [No3x](https://wordpress.org/support/users/no3x/)
 * (@no3x)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/wordpress-database-error-duplicate-column-name-error/#post-8823242)
 * Hi,
 * there are always installs this error occurs on updates. I have tested the upgrade
   on 3 WordPress installs with different plugin versions to 1.8.0 and everything
   worked fine. So I’m actually puzzled why this happens.
 * Fortunately this is simple to fix:
    Quick fix: Deactivate then activate the plugin.(
   Make sure to enable cleanup in the settings). -> loss of logs Better fix: The
   schema looks fine but the plugin version was not updated to the actual version.
   Set the option WPML_installed_version to 1.8.0. Alternative fix: Drop the wpml
   table from the database.
 *  [No3x](https://wordpress.org/support/users/no3x/)
 * (@no3x)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/wordpress-database-error-duplicate-column-name-error/#post-9024812)
 * Closing due lack of feedback.
 *  [Tom C](https://wordpress.org/support/users/tecreasey/)
 * (@tecreasey)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/wordpress-database-error-duplicate-column-name-error/#post-9326977)
 * Hi,
 * I have updated the WP Mail Logging plugin to 1.8.1 but whatever I try I get the
   error in the Admin panel:
 * > There was at least one error while upgrading the database schema. Please report
   > the following error: Duplicate column name ‘error’
 * Also, on the Server the error I get in the log is:
 * > WordPress database error Duplicate column name ‘error’ for query ALTER TABLE`
   > wp_wpml_mails` ADD COLUMN `error` VARCHAR(400) NULL DEFAULT ” AFTER `attachments`;
   > made by require(‘wp-blog-header.php’), require_once(‘wp-load.php’), require_once(‘
   > wp-config.php’), require_once(‘wp-settings.php’), include_once(‘/plugins/wp-
   > mail-logging/wp-mail-logging.php’), No3x\WPML\WPML_Init->init, No3x\WPML\WPML_Plugin-
   > >upgrade
 * This error appears what looks like, every time a website page is loaded.
 * Any suggestions on how to fix this?
 *  [No3x](https://wordpress.org/support/users/no3x/)
 * (@no3x)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/wordpress-database-error-duplicate-column-name-error/#post-9326993)
 * Hi [@tecreasey](https://wordpress.org/support/users/tecreasey/)
 * just delete the error column with phpmyadmin. After this the upgrade should work.
 *  [Tom C](https://wordpress.org/support/users/tecreasey/)
 * (@tecreasey)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/wordpress-database-error-duplicate-column-name-error/#post-9327135)
 * Thank you for getting back to me so quickly.
 * I have done that. The column has been regenerated and the error is still there.
   Is there anything else you can suggest?
 * Regards,
 * Tom
 *  [No3x](https://wordpress.org/support/users/no3x/)
 * (@no3x)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/wordpress-database-error-duplicate-column-name-error/#post-9327154)
 * The simplest one is to delete the whole table. Is this acceptable to you?
 *  [Tom C](https://wordpress.org/support/users/tecreasey/)
 * (@tecreasey)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/wordpress-database-error-duplicate-column-name-error/#post-9327177)
 * I have tried that and I have also tried removing all plugin files and uploading
   a fresh copy. The error still exists.
 *  [No3x](https://wordpress.org/support/users/no3x/)
 * (@no3x)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/wordpress-database-error-duplicate-column-name-error/#post-9327196)
 * Did you try to check the “cleanup” option in the plugin settings and then disable
   the plugin?
 *  [Tom C](https://wordpress.org/support/users/tecreasey/)
 * (@tecreasey)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/wordpress-database-error-duplicate-column-name-error/#post-9327223)
 * Yes, I have tried that.
 * The error just continues to return.
 *  [No3x](https://wordpress.org/support/users/no3x/)
 * (@no3x)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/wordpress-database-error-duplicate-column-name-error/#post-9327304)
 * Please make sure to delete all WPML_ prefixed options in the wp_options table.
   Before trying a “fresh install”.
 *  [Tom C](https://wordpress.org/support/users/tecreasey/)
 * (@tecreasey)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/wordpress-database-error-duplicate-column-name-error/#post-9328161)
 * Okay, I tried that also but after a while, the error returned. It appears that
   in the database there is an option_name called ‘WPML_Plugin__version’ which keeps
   reverting back to an option_value of ‘1.4.2’.
 * I have changed this manually, it fixes the issue, but then the error returns 
   after a short period.
 * Where would this version number come from?
 *  [No3x](https://wordpress.org/support/users/no3x/)
 * (@no3x)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/wordpress-database-error-duplicate-column-name-error/#post-9328736)
 * Do you have some kind of staging-WordPress or any other instance of WordPress
   using the the same database?
 * > Where would this version number come from?
 * If you have changed this version number in the database manually it can only 
   be set to 1.4.2 by a 1.4.2 version of the plugin.
 * Please also check the version in the wp-mail-logging.php file. It should contain
   this highlighted version number like there: [https://github.com/No3x/wp-mail-logging/blob/release/1.8.1/wp-mail-logging.php#L6](https://github.com/No3x/wp-mail-logging/blob/release/1.8.1/wp-mail-logging.php#L6)
    -  This reply was modified 8 years, 10 months ago by [No3x](https://wordpress.org/support/users/no3x/).
    -  This reply was modified 8 years, 10 months ago by [No3x](https://wordpress.org/support/users/no3x/).
    -  This reply was modified 8 years, 10 months ago by [No3x](https://wordpress.org/support/users/no3x/).
    -  This reply was modified 8 years, 10 months ago by [No3x](https://wordpress.org/support/users/no3x/).
    -  This reply was modified 8 years, 10 months ago by [No3x](https://wordpress.org/support/users/no3x/).
    -  This reply was modified 8 years, 10 months ago by [No3x](https://wordpress.org/support/users/no3x/).

Viewing 13 replies - 1 through 13 (of 13 total)

The topic ‘WordPress database error Duplicate column name ‘error’’ is closed to 
new replies.

 * ![](https://ps.w.org/wp-mail-logging/assets/icon-256x256.jpg?rev=2562296)
 * [WP Mail Logging](https://wordpress.org/plugins/wp-mail-logging/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-mail-logging/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-mail-logging/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-mail-logging/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-mail-logging/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-mail-logging/reviews/)

## Tags

 * [duplicate](https://wordpress.org/support/topic-tag/duplicate/)

 * 13 replies
 * 4 participants
 * Last reply from: [No3x](https://wordpress.org/support/users/no3x/)
 * Last activity: [8 years, 10 months ago](https://wordpress.org/support/topic/wordpress-database-error-duplicate-column-name-error/#post-9328736)
 * Status: resolved