1

I've set up many Wordpress sites over the years but I am trying to go out of my comfort zone now and install one in AWS with some AWS features I'm learning for the first time. The initial installation is no problem. It's when I need my AWS Cert Manager SSL and Cloudfront to link up with the install that I keep getting stuck with either mixed content errors or loop in install page 2. More-or-less what I interpret, as a novice, as a catch 22.

My CF distribution has an origin at origin.example.com and CNAMEs at */example.com. When I blast the wp db and do a fresh install, if I vist example.com and get redirected (i.e. complete the install), I'll be redirected to origin.example.com as I proceed with the install. origin.example.com is insecure by design, since CF provides the SSL cert to the root only. The install works, but then I need to change the urls in wp-config to https://example.com (SSL + no subdomain), it serves the page though with a lot of mixed content errors which get blocked so it is unusable.

I even installed a plugin to convert the URLs in the db/etc and I have sedded all over. I just can't figure out where precisely the errors are coming from even using dev tools (it shows the files but not their locations/where the http still exists). I know that there's Simple SSL Plugin. I'm not opposed to using it but my site is only usable on origin.example.com, where there's no SSL, so it won't work.

On the other hand, on the install page (https://example.com) I've tried to force the siteurl/homeurl in wp-config.php to be https, but then each time I submit the install page 2, the page just refreshes and nothing happens--no errors or anything. This seems like the cleanest way to get it across the line, but I just can't straighten it out.

I realize I could scrap this and move forward with a plain-old ec2 instance and self-signed cert, but I'm close and I'm genuinely interested in the answer. I would really appreciate any advice or further smoke tests that you'd recommend.

2
  • That's an interesting case, and if you start the installer at example.com and it switches to origin.example.com automatically that's arguably a bug / missing feature, but I think you're ultimately just going to have to track down the errors and fix them. I know you say you can't find them in the dev tools, but they will be there. Try the site in a fresh browser, where you haven't accepted the certificate error yet; or look in the network tab and work down the list looking for requests from the wrong URL there.
    – Rup
    Aug 24, 2020 at 9:15
  • Mixed-content errors can be a PITA to run down...try viewing the source for any page that gives that warning and search for instances of http: - often it's in template files, like the header/footer, could be a hard-coded link like "itemtype="schema.org/WebPage" that just needs the 's' inserted, sometimes it's URLs within post content that call images using http: instead of https: so you might have to do a search/replace on DB content.....
    – Trisha
    Aug 25, 2020 at 19:21

1 Answer 1

0

I tried posting this in comments but it kept stripping some of it so I figured using this I can be sure my response formats correctly.....

Mixed-content errors can be a PITA to run down...try viewing the source for any page that gives that warning and search for instances of http: - often it's in template files, like the header/footer, could be a hard-coded link like "itemtype="http://schema.org/WebPage" that just needs the 's' inserted, sometimes it's URLs within post content that call images using http: instead of https: so you might have to do a search/replace on DB content.....

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.