[wp-trac] [WordPress Trac] #63303: Direct access to wp-settings.php results in a fatal error due to undefined ABSPATH constant.
WordPress Trac
noreply at wordpress.org
Fri Apr 18 06:35:43 UTC 2025
#63303: Direct access to wp-settings.php results in a fatal error due to undefined
ABSPATH constant.
----------------------------+------------------------------
Reporter: matinlk | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Bootstrap/Load | Version: 6.8
Severity: critical | Resolution:
Keywords: | Focuses:
----------------------------+------------------------------
Comment (by dilipbheda):
I believe we can resolve this by including the following code to load the
WordPress bootstrap files:
{{{
/** Ensure the WordPress bootstrap is loaded before proceeding. */
require __DIR__ . '/wp-load.php';
}}}
I've noticed similar usage in other core files like
- `wp-comments-post.php`
- `wp-cron.php`
- `wp-login.php`
--
Ticket URL: <https://core.trac.wordpress.org/ticket/63303#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list