Why does switch from http to https on wordpress droplet stops showing website?

I have spent all day trying to get a website to show its ssl. Everytime i got to wordpress settings and change the s on http the website will not show and i cant gain access to it through the bowser or console. I am using wordpress one click installer

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hi @devjourney:

You must first confirm that your SSL setup is correct. Let create a file hello.html at your website’s document root with any text content, such as Hello world!:

  1. echo 'Hello world!' | sudo tee -a /website/document/root/hello.html

Make it readable so your web server can read it:

  1. sudo chmod 644 /website/document/root/hello.html

Now, open this url in your browser:

If you see the Hello world! message, then your SSL setup is correct. If not, correct your SSL setup before moving on to the next step. Subsequently, finish this first step by deleting the hello.html file:

  1. sudo rm /website/document/root/hello.html

Assuming that your SSL setup is correct, now switch your WordPress site from HTTP to HTTPS. Open your WordPress config file wp-config.php in your favorite text editor. Then add the following two lines to that file, at any position above the line /* That's all, stop editing! Happy blogging. */:

define( 'WP_SITEURL', '' );
define( 'WP_HOME', '' );

The above two lines force your WordPress to use HTTPS instead of HTTP without touching any WordPress Dashboard settings. Now you can open your WordPress site using the url instead of as before.

Regards, Tom Nguyen


Thanks for the reply. I am making the changes on the Wordpress admin settings. This is after I have used Certbot through the console.

It immediately kicks me out, which is expected. The website still shows on the ip and the domain name but there is no access to domain/wp-admin or login and the error connection timed out.

Weirdly enough I don’t seem to be getting any droplet details to my emails either.

Regards Adam

Hi @devjourney,

Where exactly are you changing the said setting exactly? Additionally, when you change it to https, what happens, the website stops loading like it can’t reach it at all or you are experiencing an error of some sort?

There are usually 2 thins that can happen. The redirection from http to https breaks your website due to some plugins or something similar or that you don’t have anything listening on port 443 and thus trying to connect via https doesn’t work. Once you let us know the error you are experiencing, I’ll be able to provide you with more insight.

Regards, KFSys