After connecting a domain in Cloudflare and changing the Site Address (URL) in the "Settings" of the WordPress admin page, I can no longer access the WordPress admin panel.
The solution is simple.
1. mysql login
mysql -u root -p
USE db;
UPDATE wp_options SET option_value = 'https://yourdomain.com' WHERE option_name = 'siteurl';
UPDATE wp_options SET option_value = 'https://yourdomain.com'WHERE option_name = 'home';
UPDATE wp_options SET option_value = 'https://yourdomain.com' WHERE option_name = 'siteurl';
UPDATE wp_options SET option_value = 'https://yourdomain.com' WHERE option_name = 'home';
exit
2. Edit wp-cofing.php
add
define('WP_HOME' ,'https://www.yourdomain.com');
define('WP_SITEURL', 'https://www.yourdmain.com');
define('WP_HOME' ,'https://www.yourdomain.com');
define('WP_SITEURL' ,'https://www.yourdomain.com');
3. convert to ssl type
convert to "Full" or "Full"
Cloudflare - Wordpress wp-admin ERR_TOO_MANY_REDIRECTS