Mixed Content after WordPress fresh installation
I installed WordPress on fresh hosting. In the console, I am seeing this error.
(index):36 Mixed Content: The page at 'https://domain.net/wp-admin/' was loaded over HTTPS, but requested an insecure script 'http://domain.net/wp-includes/js/wp-emoji-release.min.js?ver=5.8'. This request has been blocked; the content must be served over HTTPS.
First, if you are using Cloudflare, Turn SSL/TLS mode “full” or “strict”.
Automatic HTTPS Rewrites turn “on”.
Always Use HTTPS turn “on”.
If not fixed go to database, “wp_options” table,
change “siteurl”, and “home”
“http://yourdomain.com” to “https://yourdomain.com”
go to “wp-config.php” file.
add these lines.
define( 'WP_SITEURL', 'https://blog.wiz.us5.ircnow.org/wordpress' ); define( 'WP_HOME', 'https://blog.wiz.us5.ircnow.org/wordpress' );
Install the plugin “better search replace”. Then, in all tables, search for http://example.com and replace with https://example.com.
There was no need to add those lines to wp-config.php.