Support » Fixing WordPress » DB error

  • Hello WP community
    my Php logs say I’ve got an error on DB. Not sure where to start to fix this and I’d really appreciate your help… thanks

    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 wp_posts.post_type = ‘download’ AND (wp_posts.post_status = ‘publish’ O’ at line 1 for query SELECT SQL_CALC_FOUND_ROWS wp_posts.ID FROM wp_posts WHERE 1=1 AND ((())) AND wp_posts.post_type = ‘download’ AND (wp_posts.post_status = ‘publish’ OR wp_posts.post_status = ‘refunded’ OR wp_posts.post_status = ‘failed’ OR wp_posts.post_status = ‘revoked’ OR wp_posts.post_status = ‘abandoned’ OR wp_posts.post_status = ‘processing’ OR wp_posts.post_status = ‘active’ OR wp_posts.post_status = ‘inactive’) ORDER BY wp_posts.post_date DESC LIMIT 0, 10 made by require(‘wp-blog-header.php’), wp, WP->main, WP->query_posts, WP_Query->query, WP_Query->get_posts

Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator Steve Stern

    (@sterndata)

    Support Team Volunteer

    This may be a plugin or theme thing. Please attempt to disable all plugins, and use one of the default (Twenty*) themes. If the problem goes away, enable them one by one to identify the source of your troubles.

    Start with any plugins related to “download”.

    If you can install plugins, install “Health Check”: https://wordpress.org/plugins/health-check/ On the troubleshooting tab, you can click the button to disable all plugins and change the theme for you, while you’re still logged in, without affecting normal visitors to your site. You can then use its admin bar menu to turn on/off plugins and themes one at a time.

    • This reply was modified 1 month, 2 weeks ago by Steve Stern.

    Thank you. I solved by renaming the folded “wp-content” via sftp, renaming the “plugins” folder and seeing that the error disappeared. I then renamed the single plugins one by one till I found the one that was causing the failure.

    Moderator Steve Stern

    (@sterndata)

    Support Team Volunteer

    What was the problem plugin?

    Thought I had found the plugin but actually the problem is back… so I am now using “Health Check”…
    However, when I try to activate any plugin through Health Check with “Troubleshooting Mode” I get this message:
    When enabling the plugin, “plugin name”, a site failure occurred. Because of this the change was automatically reverted…

    Moderator Steve Stern

    (@sterndata)

    Support Team Volunteer

    Let’s do this the old fashioned way, then, and disable plugins from the plugins page.

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.