Error in your SQL syntax, "wp-blog-header.php"

Hi, my error log keeps repeating the same error (X theme v6.0.3):

Almost exactly every 10 minutes I get the following error on my site. Displaying:
"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 IN ('post', 'page', 'attachment', 'cs_template', 'x-' at line 1 förfrågan SELECT SQL_CALC_FOUND_ROWS wp_posts.ID FROM wp_posts WHERE 1=1 AND ((())) AND wp_posts.post_type IN ('post', 'page', 'attachment', 'cs_template', 'x-portfolio') AND (wp_posts.post_status = 'publish') GROUP BY wp_posts.ID ORDER BY wp_posts.post_date DESC LIMIT 0, 14 skapat av require('wp-blog-header.php'), wp, WP->main, WP->query_posts, WP_Query->query, WP_Query->get_posts"

Which I’m afraid is affecting my hosting and site performance.

I’ve unsuccessfuly deactivated every one of my plugins but still no change.

It seems like it has something to do with my blog index and the 14 posts that are displayed as the standard Wordpress > Options general / Reading options / Posts per page amount. What could be interfering with this? The “wp-blog-header.php” file hasn’t been changed nor is in any child theme.

Hi There,

Thanks for writing in! This error is quite unusual and it seems either you’re experiencing a plugin conflict or else you need to check your PHP & MySQL versions and make sure to use WordPress recommended versions (https://wordpress.org/about/requirements/). We recommend PHP v5.6.x or higher to avoid incompatibility issues.

I would suggest you to follow this and see if that helps.

  1. Switch to the parent theme then test if the issue persists.
  2. Deactivate all third party plugins.

Let us know how it goes.
Thanks!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.