0

I currently have wordpress installed on EC2 instance with an elastic IP. I have route 53 setup for an existing domain with a type A record set pointing to the elastic IP.

When I access the domain name in my browser, some of the web resources (js, css files) being loaded by the browser still point to the old public dns (ec2-x-xx-xx-xxx.<zone>.compute.amazonaws.com), so they fail to load and the site does not fully loaded. How do I fix this?

Chris Williams
  • 32,215
  • 4
  • 30
  • 68
sotn
  • 1,833
  • 5
  • 35
  • 65
  • 1
    The old DNS is probably configured somewhere in WordPress. You might get a better response asking at: https://wordpress.stackexchange.com/ – John Rotenstein Jun 23 '20 at 23:22
  • you can check this link https://wordpress.stackexchange.com/questions/245349/change-urls-for-static-content – Adiii Jun 24 '20 at 04:53
  • have you change `site_url` params in `wp_options` table or `wp-config.php` just check once – Avinash Dalvi Jun 25 '20 at 12:57

1 Answers1

0

I found the solution here. Under the section 'Help! My Public DNS Name Changed and now my Blog is Broken'.

The reason I was having this issue in the first place was because I switched my EC2 IP to elasticIP after I installed and setup wordpress. So wordpress had the old IP in its installation. If I had setup the elasticIP before installing wordpress I would not have had this issue. But the above the link helped me solve it.

sotn
  • 1,833
  • 5
  • 35
  • 65