Title: WordPress database error
Last modified: January 2, 2022

---

# WordPress database error

 *  [netdiscs](https://wordpress.org/support/users/netdiscs/)
 * (@netdiscs)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/wordpress-database-error-174/)
 * I’ve recently noticed this error message on the top of my homepage – i’ve not
   done any development, am up to date with my version upgrades, and generally just
   upload stock via the imp/exp app
 * Any suggestions on where to start?
 * WordPress database error: [You have an error in your SQL syntax; check the manual
   that corresponds to your MySQL server version for the right syntax to use near‘)
   AND meta_key LIKE ‘attribute\\_%” at line 1]
    SELECT post_id as variation_id,
   meta_key as attribute_key, meta_value as attribute_value FROM wp_postmeta WHERE
   post_id IN () AND meta_key LIKE ‘attribute\\_%’
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fwordpress-database-error-174%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  [corrinarusso](https://wordpress.org/support/users/corrinarusso/)
 * (@corrinarusso)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/wordpress-database-error-174/#post-15211742)
 * This is likley coming from one of your WooCommerce plugins since it is referencing
   _variation_ and _attribute_.
 * You’ll need to deactivate your plugins, and then activate them back on one-by-
   one.
 * Also activate a default WordPress theme.
    If the error is coming from your Electro
   theme, then you will need to ask their support: [https://themeforest.net/item/electro-electronics-store-woocommerce-theme/15720624](https://themeforest.net/item/electro-electronics-store-woocommerce-theme/15720624)
 *  Thread Starter [netdiscs](https://wordpress.org/support/users/netdiscs/)
 * (@netdiscs)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/wordpress-database-error-174/#post-15217999)
 * Hi [@corrinarusso](https://wordpress.org/support/users/corrinarusso/)
 * Thanks for the advice.
 * The error comes up when i activate WooCommerce
 * not sure what you mean by “activate a default WordPress theme” – i have a theme
   installed and activated, but setting a default I’m not sure. I’ve read about 
   this numerous times, but never found anything on google that goes beyond choosing/
   installing and activating.
 * Is activating a **default** something different?
 * I don’t know where to take this error to fix it:
 * wordpress
    woocommerce theme supplier something else?
    -  This reply was modified 4 years, 4 months ago by [netdiscs](https://wordpress.org/support/users/netdiscs/).
 *  Thread Starter [netdiscs](https://wordpress.org/support/users/netdiscs/)
 * (@netdiscs)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/wordpress-database-error-174/#post-15218128)
 * I’ve set debug to false in the WP-Config file, and that’s done the trick
 * but can’t help but feel the error was telling me there’s a problem – and i’ve
   just hidden it
 *  [corrinarusso](https://wordpress.org/support/users/corrinarusso/)
 * (@corrinarusso)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/wordpress-database-error-174/#post-15218952)
 * Correct – debug set to false only removes the site from displaying the error 
   on the frontend. The error will continue to log in the log file.
 * Download this theme:
    [https://en-ca.wordpress.org/themes/twentytwentyone/](https://en-ca.wordpress.org/themes/twentytwentyone/)
   and Activate it, and see if the error remains. [https://10web.io/blog/wordpress-default-theme/#:~:text=If%20you%20want%20to%20change,click%20Install%20and%20then%20Activate](https://10web.io/blog/wordpress-default-theme/#:~:text=If%20you%20want%20to%20change,click%20Install%20and%20then%20Activate).
 *  Thread Starter [netdiscs](https://wordpress.org/support/users/netdiscs/)
 * (@netdiscs)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/wordpress-database-error-174/#post-15218999)
 * Thanks for that!
 * changed the config file to true, so should see errors
    downloaded, installed 
   and activated the theme Didnt see any errors
 * activated the normal theme…. no errors.
 * thanks for the link to Default – so, activating a theme is setting a default?
   I’d expect a “Set as default” button or similar…. unless I’m misunderstanding
   what a default it.
    -  This reply was modified 4 years, 4 months ago by [netdiscs](https://wordpress.org/support/users/netdiscs/).
 *  [corrinarusso](https://wordpress.org/support/users/corrinarusso/)
 * (@corrinarusso)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/wordpress-database-error-174/#post-15219005)
 * > activating a theme is setting a default?
 * Correct.
 * Seems to have resolved itself then?
 *  Thread Starter [netdiscs](https://wordpress.org/support/users/netdiscs/)
 * (@netdiscs)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/wordpress-database-error-174/#post-15219013)
 * it appears so!
 * thanks for your help – answered the question about defaults if nothing else
    
   🙂

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

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

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 7 replies
 * 2 participants
 * Last reply from: [netdiscs](https://wordpress.org/support/users/netdiscs/)
 * Last activity: [4 years, 4 months ago](https://wordpress.org/support/topic/wordpress-database-error-174/#post-15219013)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
