Bug Summary
When creating a new local site you are unable to login. You are not given a failed login message but are redirected back to the login again.
Steps to reproduce
- Create new local site
- Go to local site wp-admin
- Try to login with credentials
- You should now be redirected to the login page and no messages regarding failed login
Environment Info
- What Operating System are you using?
Windows 11 Pro (10.0.22621) - What versions of site software (Nginx, Apache, PHP, MySQL) is used?
Nginx
PHP 8.1.9
MySQL 8.0.16
WordPress 6.2.2
Multisite No - What version of Local is installed?
Version 7.0.1+6387
Supporting info
Please provide your Local Log. See this Community Forum post for instructions on how to do so:
local-lightning.log
{"localVersion":"7.0.1+6387","osPlatform":"win32","osRelease":"10.0.22621","osArch":"ia32","windowsEdition":"Microsoft Windows 11 Pro","linuxEdition":null,"level":"warn","message":"Electron Event ready","timestamp":"2023-06-16T09:31:38.918Z"}
{"thread":"main","class":"Process","process":"mysql","level":"warn","message":"2023-06-16T09:32:04.296160Z 0 [System] [MY-010116] [Server] %%resourcesPath%%\\lightning-services\\mysql-8.0.16+6\\bin\\win64\\bin\\mysqld.exe (mysqld 8.0.16) starting as process 15212","timestamp":"2023-06-16T09:32:05.793Z"}
{"thread":"main","class":"Process","process":"mysql","level":"warn","message":"2023-06-16T09:32:04.297341Z 0 [Warning] [MY-013243] [Server] --character-set-server: The character set UTF8MB3 is deprecated and will be removed in a future release. Please consider using UTF8MB4 instead.","timestamp":"2023-06-16T09:32:05.794Z"}
{"thread":"main","class":"Process","process":"mysql","level":"warn","message":"2023-06-16T09:32:05.750533Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.","timestamp":"2023-06-16T09:32:05.794Z"}
{"thread":"main","class":"Process","process":"mysql","level":"warn","message":"2023-06-16T09:32:05.793695Z 0 [System] [MY-010931] [Server] %%resourcesPath%%\\lightning-services\\mysql-8.0.16+6\\bin\\win64\\bin\\mysqld.exe: ready for connections. Version: '8.0.16' socket: '' port: 10091 MySQL Community Server - GPL.","timestamp":"2023-06-16T09:32:05.795Z"}
I have found if you change the wp-config.php layout it solved the issue
Orignal Format
<?php
/**
* The base configuration for WordPress
*
* The wp-config.php creation script uses this file during the installation.
* You don't have to use the web site, you can copy this file to "wp-config.php"
* and fill in the values.
*
* This file contains the following configurations:
*
* * Database settings
* * Secret keys
* * Database table prefix
* * Localized language
* * ABSPATH
*
* @link https://wordpress.org/support/article/editing-wp-config-php/
*
* @package WordPress
*/
// ** Database settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define( 'DB_NAME', 'local' );
/** Database username */
define( 'DB_USER', 'root' );
/** Database password */
define( 'DB_PASSWORD', 'root' );
/** Database hostname */
define( 'DB_HOST', 'localhost' );
/** Database charset to use in creating database tables. */
define( 'DB_CHARSET', 'utf8' );
/** The database collate type. Don't change this if in doubt. */
define( 'DB_COLLATE', '' );
/**#@+
* Authentication unique keys and salts.
*
* Change these to different unique phrases! You can generate these using
* the {@link https://api.wordpress.org/secret-key/1.1/salt/ WordPress.org secret-key service}.
*
* You can change these at any point in time to invalidate all existing cookies.
* This will force all users to have to log in again.
*
* @since 2.6.0
*/
/**#@-*/
/**
* WordPress database table prefix.
*
* You can have multiple installations in one database if you give each
* a unique prefix. Only numbers, letters, and underscores please!
*/
$table_prefix = 'wp_';
/* Add any custom values between this line and the "stop editing" line. */
/**
* For developers: WordPress debugging mode.
*
* Change this to true to enable the display of notices during development.
* It is strongly recommended that plugin and theme developers use WP_DEBUG
* in their development environments.
*
* For information on other constants that can be used for debugging,
* visit the documentation.
*
* @link https://wordpress.org/support/article/debugging-in-wordpress/
*/
if ( ! defined( 'WP_DEBUG' ) ) {
define( 'WP_DEBUG', false );
}
define( 'WP_ENVIRONMENT_TYPE', 'local' );
/* That's all, stop editing! Happy publishing. */
/** Absolute path to the WordPress directory. */
if ( ! defined( 'ABSPATH' ) ) {
define( 'ABSPATH', __DIR__ . '/' );
}
/** Sets up WordPress vars and included files. */
require_once ABSPATH . 'wp-settings.php';
define('AUTH_KEY', 'LD0jrpTHKhzGJKOD8z8V0FeN5qm6a8PJoaF9o7rfD7KF/fJQ25zONVoaoUQGrJc6WWW5gIA68LsUm03kKP8jKA==');
define('SECURE_AUTH_KEY', 'n2iqIaPodV8kg345uKOpslKfppRTblU92zQcgVTc7YhNszIpUk2Ehs7o13nvw4QEf/TtfCAgqljiGiDVPUAL4Q==');
define('LOGGED_IN_KEY', 'Xuz/gQynehHg5LF8STZQzFe1RcF3VFXZgTebizIloEt/0za29T3QB8xP833LUMowiMGMU2E7dkgla2NYflR/5g==');
define('NONCE_KEY', 'AsVueJwGa3ZTYCe3K8pACFn+Pyo9z+pxHo+HTtBqR7fRTsXCjXP8Ccoxf6FLmB14hlNWSiUY6McRegi8HS18vA==');
define('AUTH_SALT', 'R7ip5JGIOvuNJQiA8JW1YgJED+gg9jksc7ugiHrX/Q9z6aM10mptR6o6pQ+/81mmcZFpbSN9s+3J3kh1dHrObw==');
define('SECURE_AUTH_SALT', '/P+ek8f6T2GAXUz2lRa4bMcjehLgYihpISbXX3ZfnkzG6Tn9AvezvFAyweJqM87c9m3fjynH0rGIK32TiGlfHA==');
define('LOGGED_IN_SALT', 'zfLfr2RGslsgubWeFzOEODaWCcFbjmvfTfn5oWeAv/2Ceh7zDbofFH58cuqnzzJNyjYnb1M7/PfOJosjXwJWDg==');
define('NONCE_SALT', 'NHOriWR7z8874qpGaV5NDLlp/n5tIHUEBloQAQQvntd8EObsvU5r5O56wn3afq/5dV8ZqdCpjZxuAU1rcxABbg==');
Fixed format
<?php
/**
* The base configuration for WordPress
*
* The wp-config.php creation script uses this file during the installation.
* You don't have to use the web site, you can copy this file to "wp-config.php"
* and fill in the values.
*
* This file contains the following configurations:
*
* * Database settings
* * Secret keys
* * Database table prefix
* * Localized language
* * ABSPATH
*
* @link https://wordpress.org/support/article/editing-wp-config-php/
*
* @package WordPress
*/
// ** Database settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define( 'DB_NAME', 'local' );
/** Database username */
define( 'DB_USER', 'root' );
/** Database password */
define( 'DB_PASSWORD', 'root' );
/** Database hostname */
define( 'DB_HOST', 'localhost' );
/** Database charset to use in creating database tables. */
define( 'DB_CHARSET', 'utf8' );
/** The database collate type. Don't change this if in doubt. */
define( 'DB_COLLATE', '' );
/**#@+
* Authentication unique keys and salts.
*
* Change these to different unique phrases! You can generate these using
* the {@link https://api.wordpress.org/secret-key/1.1/salt/ WordPress.org secret-key service}.
*
* You can change these at any point in time to invalidate all existing cookies.
* This will force all users to have to log in again.
*
* @since 2.6.0
*/
/**#@-*/
/**
* WordPress database table prefix.
*
* You can have multiple installations in one database if you give each
* a unique prefix. Only numbers, letters, and underscores please!
*/
$table_prefix = 'wp_';
/* Add any custom values between this line and the "stop editing" line. */
define('AUTH_KEY', 'LD0jrpTHKhzGJKOD8z8V0FeN5qm6a8PJoaF9o7rfD7KF/fJQ25zONVoaoUQGrJc6WWW5gIA68LsUm03kKP8jKA==');
define('SECURE_AUTH_KEY', 'n2iqIaPodV8kg345uKOpslKfppRTblU92zQcgVTc7YhNszIpUk2Ehs7o13nvw4QEf/TtfCAgqljiGiDVPUAL4Q==');
define('LOGGED_IN_KEY', 'Xuz/gQynehHg5LF8STZQzFe1RcF3VFXZgTebizIloEt/0za29T3QB8xP833LUMowiMGMU2E7dkgla2NYflR/5g==');
define('NONCE_KEY', 'AsVueJwGa3ZTYCe3K8pACFn+Pyo9z+pxHo+HTtBqR7fRTsXCjXP8Ccoxf6FLmB14hlNWSiUY6McRegi8HS18vA==');
define('AUTH_SALT', 'R7ip5JGIOvuNJQiA8JW1YgJED+gg9jksc7ugiHrX/Q9z6aM10mptR6o6pQ+/81mmcZFpbSN9s+3J3kh1dHrObw==');
define('SECURE_AUTH_SALT', '/P+ek8f6T2GAXUz2lRa4bMcjehLgYihpISbXX3ZfnkzG6Tn9AvezvFAyweJqM87c9m3fjynH0rGIK32TiGlfHA==');
define('LOGGED_IN_SALT', 'zfLfr2RGslsgubWeFzOEODaWCcFbjmvfTfn5oWeAv/2Ceh7zDbofFH58cuqnzzJNyjYnb1M7/PfOJosjXwJWDg==');
define('NONCE_SALT', 'NHOriWR7z8874qpGaV5NDLlp/n5tIHUEBloQAQQvntd8EObsvU5r5O56wn3afq/5dV8ZqdCpjZxuAU1rcxABbg==');
/**
* For developers: WordPress debugging mode.
*
* Change this to true to enable the display of notices during development.
* It is strongly recommended that plugin and theme developers use WP_DEBUG
* in their development environments.
*
* For information on other constants that can be used for debugging,
* visit the documentation.
*
* @link https://wordpress.org/support/article/debugging-in-wordpress/
*/
if ( ! defined( 'WP_DEBUG' ) ) {
define( 'WP_DEBUG', false );
}
define( 'WP_ENVIRONMENT_TYPE', 'local' );
/* That's all, stop editing! Happy publishing. */
/** Absolute path to the WordPress directory. */
if ( ! defined( 'ABSPATH' ) ) {
define( 'ABSPATH', __DIR__ . '/' );
}
/** Sets up WordPress vars and included files. */
require_once ABSPATH . 'wp-settings.php';