Error 403 on wp-admin – Redirection to upgrade.php

The Error 403 with a redirection to upgrade.php in a WordPress site’s admin area can be a bit tricky to diagnose and resolve, as it can stem from various issues, including file permissions, server configuration, database problems, or corrupted files. Let’s go through some steps to troubleshoot and potentially resolve this issue:

  1. File Permissions:

    • Incorrect file permissions are a common cause of Error 403. Ensure that directories are set to 755 and files to 644. You can use an FTP client or SSH to check and modify file permissions.
  2. .htaccess File:

    • A misconfigured .htaccess file can lead to access issues. Try renaming your .htaccess file (e.g., to .htaccess_old) and see if the issue resolves. If it does, go to Settings → Permalinks in your WordPress dashboard and just click “Save Changes” to reset your .htaccess file with proper configuration.
  3. WordPress Files:

    • Corrupted WordPress core files could cause this issue. Re-upload all files and folders except the wp-content folder and the wp-config.php file from a fresh WordPress download. This can be done via FTP.
  4. Database Issues:

    • Since the issue started after loading a backup, ensure that the database is correctly restored and that the wp-config.php file has the correct database credentials.
    • Check the siteurl and home values in the wp_options table of your WordPress database to ensure they are correct.
  5. Plugins and Themes:

    • Sometimes, a plugin or theme conflict can cause this issue. Rename your plugins folder (e.g., to plugins_old) to deactivate all plugins. If this fixes the issue, rename the folder back to plugins and then reactivate each plugin one by one to identify the culprit.
    • Similarly, try switching to a default theme (like Twenty Twenty-One) to rule out theme conflicts.
  6. Server Configuration:

    • If you have access to server configuration files or can contact your hosting provider, check for any server-level access restrictions or mod_security rules that might be blocking access to wp-admin.
  7. WordPress Upgrade Process:

    • The redirect to upgrade.php suggests that WordPress might be trying to complete an update. Ensure that your WordPress files are up to date and that the database version in version.php matches the one in your database wp_options table (the db_version value).
  8. Check Error Logs:

    • Review your server’s error logs for any specific entries that might give more clues as to what’s causing the 403 error.
  9. Security Plugins:

    • If you have any security plugins installed, they might be mistakenly blocking access to the admin area. Check their settings or temporarily disable them.
  10. Contact Hosting Provider:

  • If none of these steps resolve the issue, contact your hosting provider since they can assist with this matter in a better way then.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)