Local version of a WordPress site – SSL/HTTPS enforced?

WordPress keeps WP_HOME and WP_SITEURL in DB, this is set during initial installation and usually is the domain of your website, in your case it is a domain with https.

Your visiting site via local domain, but WordPress redirects to https live domain, causing redirect loop which obviously fails.

To fix this, change WP_HOME and WP_SITEURL values in DB.

Or simply add this to wp-config.php:

define('WP_HOME','http://domain.local');
define('WP_SITEURL','http://domain.local');

Also remember that your browser is caching redirects aggressively. You need to clean cache to see results, or use browser incognito mode.

Leave a Comment