Title: Cannot log to admin after update
Last modified: November 1, 2022

---

# Cannot log to admin after update

 *  Resolved [buliin](https://wordpress.org/support/users/buliin/)
 * (@buliin)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/cannot-log-to-admin-after-update/)
 * Recently, my website was updated to WordPress 5.9.5 and it crashed. There was
   a message with critical error, so I turned on Debug mode, disabled plugins by
   renaming the folder and switched to default theme in MySQL db.
 * However the steps did not helped and I cannot log to admin panel.
    When I try
   to log there, the error appears saying that the user is not existing.
 * However, I checked directly in DB and this user exists (tried both email and 
   nickname). I have even reset the password, but still same result.
 * In logs I can see the following error:
    `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 ') ORDER BY wp_posts.post_date DESC LIMIT 0, 10' at 
   line 1 of the WordPress database while executing a query SELECT SQL_CALC_FOUND_ROWS
   wp_posts.ID FROM wp_posts WHERE 1 = 1 AND ((wp_posts.post_status = 'publish')))
   ORDER BY wp_posts.post_date DESC LIMIT 0, 10 sent by require (''), wp, WP-> main,
   WP-> query_posts, WP_Query-> query, WP_Query- > get_posts`
 * I can see that there is one “)” but I have no idea where this function is being
   build and how can I fix it, since I am not an advanced user.
 * Do you have any ideas how I could fix it?
    -  This topic was modified 3 years, 6 months ago by [Jan Dembowski](https://wordpress.org/support/users/jdembowski/).

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

 *  [Wes Theron](https://wordpress.org/support/users/west7/)
 * (@west7)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/cannot-log-to-admin-after-update/#post-16150996)
 * Hi [@buliin](https://wordpress.org/support/users/buliin/)
 * That sounds frustrating. I was wondering if you have cleared your browser cache
   and cookies to ensure the problem is real?
 * Secondly, which hosting company are you using?
 * Cheers
    Wes
 *  Thread Starter [buliin](https://wordpress.org/support/users/buliin/)
 * (@buliin)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/cannot-log-to-admin-after-update/#post-16151019)
 * Hi [@west7](https://wordpress.org/support/users/west7/),
 * Thank you for quick reply.
 * When I cleared cache, I received on a /wp-admin/ page info that there was a critical
   error and additional instructions were sent to mail. However, I have not received
   this email. I checked SPAM folder and there is no email.
 * So now I do not even have the login page for admin panel 🙁
 * The hosting company is az.pl from Poland.
 *  [Wes Theron](https://wordpress.org/support/users/west7/)
 * (@west7)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/cannot-log-to-admin-after-update/#post-16151038)
 * You can always contact your hosting company for support as well: [https://pomoc.az.pl/kontakt/](https://pomoc.az.pl/kontakt/)
 * Check if you must update your database. To see if there’s an update available
   for your WordPress database, follow the path wp-admin/upgrade.php on your website
   URL.
 * Example: [http://www.yourdomain.pl/](http://www.yourdomain.pl/)**wp-admin/upgrade.
   php**
 *  Thread Starter [buliin](https://wordpress.org/support/users/buliin/)
 * (@buliin)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/cannot-log-to-admin-after-update/#post-16153147)
 * I tried to use the /wp-admin/upgrade.php but nothing changes 🙁
 * I have created a new WordPress instance and used UpdraftPlus backup files to 
   restore the website and here is what I have found:
    – restoring everything apart
   from db files works ok – while restoring the db, I get a notification that the
   backup was created with PHP 7.1. The earliest version of PHP that I have on my
   hosting company is 7.2. When I try to restore it, the website crashes. So I guess
   there must have been some changes in the DB structure / interface that broke 
   the website. Do you know if there is any way of restoring the content of the 
   website from the DB itself?
 * I will contact the support as well.
 *  Thread Starter [buliin](https://wordpress.org/support/users/buliin/)
 * (@buliin)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/cannot-log-to-admin-after-update/#post-16153264)
 * Not knowing what to do, I changed the PHP version on the hosting from 7.1 to 
   8.1 and the webpage started to work again! I reactiveated all themes and plugins
   and I only needed to “Save” permalinks and everything is ok now.
 * [@west7](https://wordpress.org/support/users/west7/) thank you for your help!
    -  This reply was modified 3 years, 6 months ago by [buliin](https://wordpress.org/support/users/buliin/).
 *  [Wes Theron](https://wordpress.org/support/users/west7/)
 * (@west7)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/cannot-log-to-admin-after-update/#post-16154094)
 * That is great news!
 * All the best

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

The topic ‘Cannot log to admin after update’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 6 replies
 * 2 participants
 * Last reply from: [Wes Theron](https://wordpress.org/support/users/west7/)
 * Last activity: [3 years, 6 months ago](https://wordpress.org/support/topic/cannot-log-to-admin-after-update/#post-16154094)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
