[wp-trac] [WordPress Trac] #23197: wp-activate.php, without explanation, does not load site plugins
WordPress Trac
noreply at wordpress.org
Wed Jul 23 20:44:04 UTC 2025
#23197: wp-activate.php, without explanation, does not load site plugins
---------------------------------------+-----------------------------
Reporter: radiok | Owner: (none)
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: Future Release
Component: Login and Registration | Version: 3.0
Severity: normal | Resolution:
Keywords: needs-testing needs-patch | Focuses: multisite
---------------------------------------+-----------------------------
Comment (by jerclarke):
Ok, following up for myself and anyone else with the same issue, this was
enough to silence errors on non-multisite installs where we basically use
it to reliably disable `wp-activate.php` before the theme is loaded,
rather than after.
Added at the top of the theme's `/functions.php`:
{{{
if ( !is_multisite() AND isset($_SERVER["REQUEST_URI"]) AND
str_contains($_SERVER["REQUEST_URI"], 'wp-activate.php') ) {
http_response_code(403);
die();
}
}}}
I made it a 403 because in this scenario there's no reason for anyone to
visit that URL.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/23197#comment:26>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list