Support » Fixing WordPress » wp config create uses outdated data

  • Hello,

    I downloaded latest WP files and then run wp config create to generate wp-config.php. I noticed that generated wp-config.php has following lines:

    /** Absolute path to the WordPress directory. */
    if ( ! defined( 'ABSPATH' ) ) {
            define( 'ABSPATH', dirname( __FILE__ ) . '/' );
    }

    While wp-config-sample.php has:

    /** Absolute path to the WordPress directory. */
    if ( ! defined( 'ABSPATH' ) ) {
            define( 'ABSPATH', __DIR__ . '/' );
    }

    I found that change from “FILE” to “DIR” was implemented in this commit

    But wp-cli seem still uses old template.

    I use latest wp-cli version:

    wp --info
    PHP version:    7.4.12
    WP-CLI root dir:        phar://wp-cli.phar/vendor/wp-cli/wp-cli
    WP-CLI vendor dir:      phar://wp-cli.phar/vendor
    WP_CLI phar path:       /var/www/html
    WP-CLI packages dir:
    WP-CLI global config:
    WP-CLI project config:
    WP-CLI version: 2.5.0

    While that does not seem to affect website work, it feels incorrect to have all core files updated to “DIR”, but have “FILE” in wp-config.php. Please advise.

    • This topic was modified 1 month, 2 weeks ago by Yui.
    • This topic was modified 1 month, 2 weeks ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not a Requests and Feedback topic
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.