Redirect WordPress HTTPS to HTTP without editing .htaccess

On: 24th May 2017
In: Tutorials
Views: 44105

Here is a solution you can use if you want to force your WordPress website to redirect all HTTPS pages without having to edit the .htaccess file.

Copy this code and paste it at the bottom of your theme functions.php:

This is the most reliable method for the redirect behavior as for example there are several WordPress plugins that can overwrite changes to the .htaccess file.

Alternatively you may want to redirect your WordPress website from HTTP to HTTPS:

You can place this code at the bottom of your theme functions.php

Tags: , ,

Leave a Reply

Your email address will not be published. Required fields are marked *