0

One of my customers reported me an error on its website. we loaded a backup because it is a production site, however, since then, we no longer have access to wp-admin. The message I get when I go to /wp-admin is a 403 error, with a redirect to upgrade.php?_wp_http_referer=%2Fwp-admin%2F

The full error is the fullowing :

Access forbidden! You do not have the right to access the requested object. Either it is protected or it cannot be read by the server.

If you believe this is a server error, please contact the webmaster.

Error 403 Apache

I already tried to change the db_version in the version.php file and in my database, it didn't worked.

1 Answer 1

0

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.
1
  • Thank you, it's a bit late but we discovered that the .htaccess file was wrong. Thank you for the answer !
    – sorrow
    Nov 15, 2023 at 7:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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