I’m having this weird issue with a clients WP multi-site. It works correctly until you log in to the admin panel. It then converts the featured images on the homepage posts to https
making them appear as dead links. If you log out of WP, this problem still exists.
To fix, I go into MySQL and update the siteurl
to be http://www.lovebryan.com
instead of https://www.lovebryan.com
. The images appear correctly again.
In my wp-config, I have the following:
define('WP_HOME','www.lovebryan.com');
define('WP_SITEURL','www.lovebryan.com');
define('DOMAIN_CURRENT_SITE', 'www.lovebryan.com');
in my .htaccess I have the following:
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*.php)$ $2 [L]
RewriteRule . index.php [L]
Why does the siteurl
keep reverting back to https
?
You need to include
http://
within yourWP_HOME
andWP_SITEURL
definitions.If you still have issues, try also defining the url (with
http://
) infunctions.php
of your theme.More information can be found here: https://codex.wordpress.org/Changing_The_Site_URL