1

I am Using Wordpress for making a website and getting below Error only on my pages and No shortcodes are working due to this error. This error ONLY seen on PAGES they are working fine on POSTS. I don't know the solution of this error please help me out. I am new to wordpress.

Error:

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 '' at line 1]

SELECT wp_users.ID, wp_users.user_nicename FROM wp_users INNER JOIN wp_usermeta ON wp_users.ID = wp_usermeta.user_id WHERE wp_usermeta.meta_key = 'wp_capabilities' AND wp_usermeta.meta_value LIKE '%administrator%' OR wp_usermeta.meta_key = 'wp_capabilities' AND wp_usermeta.meta_value LIKE '%subscriber%' OR wp_usermeta.meta_key = 'wp_capabilities' AND wp_usermeta.meta_value LIKE '%author%' OR wp_usermeta.meta_key = 'wp_capabilities' AND wp_usermeta.meta_value LIKE '%editor%' OR wp_usermeta.meta_key = 'wp_capabilities' AND wp_usermeta.meta_value LIKE '%contributor%' ORDER BY wp_users.user_nicename LIMIT 0,

1

It looks like problem is coming from any of installed plug in or your theme.

  • Backup your database.
  • Switch to default wordpress theme.
  • If problem disappears, your theme is the culprit.
  • If problem still exists, Deactivate all installed plugins.
  • If problem disappears, activate plugins one by one and see which plugin causes the error.
  • If problem still exists, you might need a fresh wordpress install.

If any plugin or theme causes the problem, report to the developer and wait for the solution. Or find an alternate plugin or theme.
Hope it helps..

1

There are many wordpress plugins which are not written correctly. Or some plugins are written for old version of wordpress. Please test your plugins. One of them might be causing the problem. Please refer the steps indicated by @karthik for detailed testing.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.