Title: error in WordPress DB!
Last modified: January 31, 2021

---

# error in WordPress DB!

 *  [Reza Masoumpour](https://wordpress.org/support/users/rezamas/)
 * (@rezamas)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/error-in-wordpress-db/)
 * Hi,
    I’ve got error this error; I did not install, update or change plugins or
   themes or WordPress. Restoring backup did not work. How can solve the problem?!
 *     ```
       `خطای پایگاه‌دادهٔ وردپرس : [You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1]
       SELECT wp_posts.* FROM wp_posts WHERE 1=1 AND wp_posts.post_type = 'cms_block' AND ((wp_posts.post_status = 'publish')) ORDER BY wp_posts.post_date DESC LIMIT , 500
   
       خطای پایگاه‌دادهٔ وردپرس : [You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1]
       SELECT wp_posts.* FROM wp_posts WHERE 1=1 AND wp_posts.post_type = 'cms_block' AND ((wp_posts.post_status = 'publish')) ORDER BY wp_posts.post_date DESC LIMIT , 500
   
       خطای پایگاه‌دادهٔ وردپرس : [You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1]
       SELECT wp_posts.ID FROM wp_posts WHERE 1=1 AND wp_posts.post_type = 'cms_block' AND ((wp_posts.post_status = 'publish')) ORDER BY wp_posts.post_date DESC LIMIT , 250
   
       خطای پایگاه‌دادهٔ وردپرس : [You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1]
       SELECT wp_posts.* FROM wp_posts WHERE 1=1 AND wp_posts.post_type = 'cms_block' AND ((wp_posts.post_status = 'publish')) ORDER BY wp_posts.post_date DESC LIMIT , 500
   
       خطای پایگاه‌دادهٔ وردپرس : [You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1]
       SELECT * FROM wp_posts WHERE (post_type = 'page' AND post_status = 'publish') AND post_parent = 13938 ORDER BY wp_posts.post_title ASC LIMIT
       ```
   
    -  This topic was modified 5 years, 4 months ago by [Yui](https://wordpress.org/support/users/fierevere/).
      Reason: redundant link(s) deleted
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ferror-in-wordpress-db%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  [a2hostingrj](https://wordpress.org/support/users/a2hostingrj/)
 * (@a2hostingrj)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/error-in-wordpress-db/#post-13983907)
 * Did you also restore the database? Or just the files?
 * It might be a plugin conflict. I suggest to consider temporarily disable all 
   plugins/themes (Do another backup before doing any change):
 * [https://wordpress.org/support/article/managing-plugins/#manual-uninstallation](https://wordpress.org/support/article/managing-plugins/#manual-uninstallation)
 *  Thread Starter [Reza Masoumpour](https://wordpress.org/support/users/rezamas/)
 * (@rezamas)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/error-in-wordpress-db/#post-13989536)
 * Both db and files restored and even disabled all plugins and switched to default
   theme but problem remained… Anyway, I find out panel’s PHP version is changed
   to 7.4 and when changed to 7.3 back, problem solved. Is this problem related 
   to PHP?! Looks like SQL syntax.
 *  [a2hostingrj](https://wordpress.org/support/users/a2hostingrj/)
 * (@a2hostingrj)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/error-in-wordpress-db/#post-13994786)
 * Related to the version probably. Did you change the version?
 *  Thread Starter [Reza Masoumpour](https://wordpress.org/support/users/rezamas/)
 * (@rezamas)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/error-in-wordpress-db/#post-13994939)
 * [@a2hostingrj](https://wordpress.org/support/users/a2hostingrj/) I did not but
   it changed to panel’s default. Problem solved but I’m not sure what was the cause.
   Thanks anyway.

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

The topic ‘error in WordPress DB!’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 2 participants
 * Last reply from: [Reza Masoumpour](https://wordpress.org/support/users/rezamas/)
 * Last activity: [5 years, 4 months ago](https://wordpress.org/support/topic/error-in-wordpress-db/#post-13994939)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
