Title: Database Error Duplicate Column Name
Last modified: September 6, 2019

---

# Database Error Duplicate Column Name

 *  Resolved [unalgu](https://wordpress.org/support/users/unalgu/)
 * (@unalgu)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/database-error-duplicate-column-name/)
 * Thank you for the plug-in. I am trying to use the plug-in on a multisite environment
   with W3 Total Cache and getting the following error message.
 * [Fri Sep 06 10:57:48.814352 2019] [proxy_fcgi:error] [pid 55375:tid 140651825489664][
   client 66.71.97.152:49314] AH01071: Got error ‘PHP message: WordPress database
   error Duplicate column name ‘local’ for query ALTER TABLE wp_caos_webfonts ADD
   COLUMN local varchar(128) AFTER font_style; made by require_once(‘wp-load.php’),
   require_once(‘wp-config.php’), require_once(‘wp-settings.php’), do_action(‘plugins_loaded’),
   WP_Hook->do_action, WP_Hook->apply_filters, hwlRunDbUpdates, hwlAddLocalColumn,
   W3TC\\DbCache_Wpdb->query, W3TC\\DbCache_WpdbInjection_QueryCaching->query, W3TC\\
   _CallUnderlying->query, W3TC\\DbCache_Wpdb->query, W3TC\\DbCache_WpdbInjection-
   >query, W3TC\\DbCache_Wpdb->default_query’
 * Any assistance would be greatly appreciated.

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

 *  Plugin Author [Daan van den Bergh](https://wordpress.org/support/users/daanvandenbergh/)
 * (@daanvandenbergh)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/database-error-duplicate-column-name/#post-11908253)
 * That’s strange. It seems like it’s trying to install the same table twice, while
   it should be installing the table for each of your sites, using a different prefix(
   e.g. wp_1_, wp_2_, etc.)
 * Have you tried disabling W3TC temporarily and installing the plugin? It might
   be that W3TC is caching the query.
 * After installing the plugin you can re-enable W3TC.
 *  Thread Starter [unalgu](https://wordpress.org/support/users/unalgu/)
 * (@unalgu)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/database-error-duplicate-column-name/#post-11914396)
 * Thank you for the quick response. I will try that and let you know.
 * Thanks again.
 *  Thread Starter [unalgu](https://wordpress.org/support/users/unalgu/)
 * (@unalgu)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/database-error-duplicate-column-name/#post-11914456)
 * The error is still there.
 * [Mon Sep 09 11:12:35.258685 2019] [proxy_fcgi:error] [pid 93916:tid 140650867562240][
   client 202.14.12.94:51180] AH01071: Got error ‘PHP message: WordPress database
   error Duplicate column name ‘local’ for query ALTER TABLE wp_caos_webfonts ADD
   COLUMN local varchar(128) AFTER font_style; made by require(‘wp-blog-header.php’),
   require_once(‘wp-load.php’), require_once(‘wp-config.php’), require_once(‘wp-
   settings.php’), do_action(‘plugins_loaded’), WP_Hook->do_action, WP_Hook->apply_filters,
   hwlRunDbUpdates, hwlAddLocalColumn’
 * Please advise.
 *  Plugin Author [Daan van den Bergh](https://wordpress.org/support/users/daanvandenbergh/)
 * (@daanvandenbergh)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/database-error-duplicate-column-name/#post-11914468)
 * Then I’ll have to figure this out and replicate the issue on a local machine.
   Are you trying to install the plug-in from the Site Root or ‘within’ a site (
   if that’s even possible?)
 *  Thread Starter [unalgu](https://wordpress.org/support/users/unalgu/)
 * (@unalgu)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/database-error-duplicate-column-name/#post-11914622)
 * from the site root and then configuring it within each site. i also tried deleting
   the plugin completely and dropping the tables from each site and reinstall same
   issue.
 * could it be a conflict with another plug in like caos local analytics. Please
   let me know as I have caos analytics running successfully on the site.
 * cheers
 *  [kristoffer132](https://wordpress.org/support/users/kristoffer132/)
 * (@kristoffer132)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/database-error-duplicate-column-name/#post-11936055)
 * I have the same problem/error on WPEngine and multisite. Hope you find a solution
   soon.
 *  Plugin Author [Daan van den Bergh](https://wordpress.org/support/users/daanvandenbergh/)
 * (@daanvandenbergh)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/database-error-duplicate-column-name/#post-11936069)
 * Hi guys,
 * I found out that some extra steps are necessary to properly create the database
   tables in Multisite. I’ll release an update ASAP.
 * Apologies for the inconvenience.
 *  [kristoffer132](https://wordpress.org/support/users/kristoffer132/)
 * (@kristoffer132)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/database-error-duplicate-column-name/#post-11940697)
 * Thanks, Perfect!
 *  Plugin Author [Daan van den Bergh](https://wordpress.org/support/users/daanvandenbergh/)
 * (@daanvandenbergh)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/database-error-duplicate-column-name/#post-11989907)
 * Hi [@kristoffer132](https://wordpress.org/support/users/kristoffer132/) and [@unalgu](https://wordpress.org/support/users/unalgu/),
 * To debug your issue I’ve setup a local environment using Multisite. To be honest,
   I couldn’t replicate this issue.
 * The only thing I can think off, is that it has something to do with your caching
   plugins or that your database prefix settings aren’t setup properly.
 * Before creating a new site in my environment, I:
    – Disabled all plugins, – Created
   the new site, – Activated OMGF, – Changed and saved the settings, – ‘Download
   Fonts’, – ‘Generate Stylesheet’.
 * Eerything was saved and generated correctly. To generate a different stylesheet
   for each site, I changed the cache-directory option, to /cache/site1/omgf, /cache/
   site2/omgf, etc. and downloaded the fonts and generate the stylesheet again.
 * Since OMGF depends entirely on WordPress wp_options-table and saving mechanisms,
   in a Multisite environment and depending on the site you’re managing, it always
   displays and saves the values correctly in the wp_options-table of the corresponding
   site. This could be wp_options, wp_2_options, etc. The same goes for OMGF’s table,
   called ‘caos_webfonts’, which will be created as wp_caos_webfonts, wp_2_caos_webfonts,
   etc.
 * So, in short, OMGF is already fully compatible with Multisite environments and
   I couldn’t find any code I’d have to change to increase compatibility.
 * What you could try, is Network Deactivating all plugins and activate only OMGF
   per site and configure it to your wishes. And if you have the possibility, try
   the steps I described above on a completely new site, with all plugins disabled,
   perhaps another plugin is interfering with the creation of tables.
 *  Plugin Author [Daan van den Bergh](https://wordpress.org/support/users/daanvandenbergh/)
 * (@daanvandenbergh)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/database-error-duplicate-column-name/#post-12003609)
 * Hi [@kristoffer132](https://wordpress.org/support/users/kristoffer132/) and [@unalgu](https://wordpress.org/support/users/unalgu/),
 * I think I fixed it! It was a bug, but it wasn’t related to Multisite 🙂
 * Please update to version 1.9.9, when I enabled WP_DEBUG on one of my environments
   all of the sudden this error popped up. So, it should be fixed now!

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

The topic ‘Database Error Duplicate Column Name’ is closed to new replies.

 * ![](https://ps.w.org/host-webfonts-local/assets/icon-256x256.png?rev=3300821)
 * [OMGF | GDPR/DSGVO Compliant, Faster Google Fonts. Easy.](https://wordpress.org/plugins/host-webfonts-local/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/host-webfonts-local/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/host-webfonts-local/)
 * [Active Topics](https://wordpress.org/support/plugin/host-webfonts-local/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/host-webfonts-local/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/host-webfonts-local/reviews/)

 * 10 replies
 * 3 participants
 * Last reply from: [Daan van den Bergh](https://wordpress.org/support/users/daanvandenbergh/)
 * Last activity: [6 years, 7 months ago](https://wordpress.org/support/topic/database-error-duplicate-column-name/#post-12003609)
 * Status: resolved