Skip to content

Commit fbc0131

Browse files
Update wp-settings.php
PHP message: PHP Fatal error: Uncaught Error: Undefined constant "ABSPATH" in /var/www/wp-settings.php:34 on direct access to the wp-settings.php file leads 500 error
1 parent e3e0e3e commit fbc0131

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/wp-settings.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@
1313
*
1414
* @since 1.0.0
1515
*/
16+
// Don't load directly.
17+
if ( ! defined( 'ABSPATH' ) ) {
18+
die();
19+
}
20+
1621
define( 'WPINC', 'wp-includes' );
1722

1823
/**

0 commit comments

Comments
 (0)