403 Forbidden Errors in WordPress Admin After Switching from HTTP to HTTPS
-
I recently switched my WordPress site from HTTP to HTTPS. While the front end is functioning correctly, aside from a few minor issues with certain plugins, I am encountering a significant problem in the admin area. Specifically, when attempting to add a new post, I am continually met with a ‘403 Forbidden’ error upon navigating to the new post page.
what I have done but not success yet :
1.verified htaccess by debugging
2.
function add_cors_header() { $referer = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : null; $origin = isset($_SERVER['HTTP_ORIGIN']) ? $_SERVER['HTTP_ORIGIN'] : null; if (CORS_DEBUG) { error_log('referer: ' . ($referer ?? 'null') . ', origin: ' . ($origin ?? 'null')); } $site_url = substr(site_url(), strpos(site_url(), '//')); if ($referer !== null && preg_match('#^https?:' . $site_url . '#i', $referer) !== 1) { if (CORS_DEBUG) { error_log('Test if CORS allowed for: ' . $referer); } // Additional logic here } }3. file permissions 645 and folder permissions 755

-
-
- The topic ‘403 Forbidden Errors in WordPress Admin After Switching from HTTP to HTTPS’ is closed to new replies.