K
K
Konstantin2014-12-23 14:39:38
Computer networks
Konstantin, 2014-12-23 14:39:38

How to change https to http wp?

When setting up WordPress, I accidentally set https, I don’t really want to buy an ssl certificate separately, since I’m not an online store and I don’t accept payment. How to return the address to http in the browser? because users get a warning
174d75ce3ff54d45a1be959356fdeb83.jpg

Answer the question

In order to leave comments, you need to log in

2 answer(s)
J
jlekapb, 2014-12-23
@jlekapb

There wp-config.phpmust be a code

// Determine HTTP or HTTPS, then set WP_SITEURL and WP_HOME
    if (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443)
    {
        $protocol_to_use = 'https://';
    } else {
        $protocol_to_use = 'http://';
    }
    define( 'WP_SITEURL', $protocol_to_use . $_SERVER['HTTP_HOST']);
    define( 'WP_HOME', $protocol_to_use . $_SERVER['HTTP_HOST']);

do$protocol_to_use = "http://"

C
CJUA, 2020-10-24
@CJUA

I didn’t find it, there are many ways, but this one showed the result and restored access. THX. I left it as a lifesaver, since in the future I will try to switch to https

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question