Please help me with odd issue.

[ad_1]

I have my wordpress site installed on a linux server and I use cloudflare to run it through HTTPS. I was having trouble accessing the wp-admin. It says that it receives an error for “too many redirects”, so I added these lines to wp-config.php:

define( ‘WP\_HOME’, ‘[http://www.site.com](https://www.ls-ttl.com)’ );

define( ‘WP\_SITEURL’, ‘[http://www.site.com](https://www.ls-ttl.com)’ );

I could then access the Dashboard. The problem is, when I refreshed the actual website many images were now showing up as broken links. If I change the lines from http to https, all the images work fine but then I’m unable to access the dashboard again:

define( ‘WP\_HOME’, ‘[https://www.site.com](https://www.ls-ttl.com)’ );

define( ‘WP\_SITEURL’, ‘[https://www.site.com](https://www.ls-ttl.com)’ );

Currently, I basically have to go back and forth between http and https in the wp-config.php in order to edit the site and then back when I want it to be fully functional. Does anyone have a clue how I go about fixing this?

[ad_2]
1 Comment
  1. You need to setup an SSL cert on your server.

    If your host is AWS Lightsail (who use that wp-config setup), you can install your cert with the `bncert-tool` command [https://docs.aws.amazon.com/lightsail/latest/userguide/amazon-lightsail-enabling-https-on-wordpress.html](https://docs.aws.amazon.com/lightsail/latest/userguide/amazon-lightsail-enabling-https-on-wordpress.html)

    Once that’s done, ensure your site is using HTTPS everywhere, so in wp-config.php, the Settings page, and then you also need to fix your links within the site – do that with a plugin called Better Search Replace.

    In Cloudflare, ensure the SSL setting is Strict or Strict Full.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer