Wordpress Change URL after Migrating to Amazon EC2
<p>I am doing migration of Wordpress from one Amazon EC2 instance to another Amazon EC2 instance after it is messed up. So I did the installation of LAMP from the AWS documentation. I have moved my Wordpress contents into <code>/var/www/html</code>. I have also prepared the database accordingly and run the <code>.sql</code> backup file. </p>

<p>But then when I go to the IP address, it just could not load. My guess is the current Wordpress is using the old IP of the instance while I now have a new IP for the new instance. How do I fix this? </p>

<p>So far what I did to get access into the website:</p>

<p>Based on <a href="https://codex.wordpress.org/Changing_The_Site_URL" rel="nofollow">https://codex.wordpress.org/Changing_The_Site_URL</a> I have put below code in my <code>wp-config.php</code> file</p>

<pre><code>define('WP_HOME','http://X.X.X.X');
define('WP_SITEURL','http://X.X.X.X');
</code></pre>

<p>But it did not work. Any guidance is highly appreciated. Thank you.</p>

<p>UPDATE:</p>

<p>Sorry for being unclear about the observation. Says my old IP was <a href="http://1.1.1.1" rel="nofollow">http://1.1.1.1</a>, and my new IP is <a href="http://1.1.1.2" rel="nofollow">http://1.1.1.2</a>. After the changes, when I try to go to <a href="http://1.1.1.2" rel="nofollow">http://1.1.1.2</a>, it just like take some times to load then suddenly it tries to bring me back to <a href="http://1.1.1.1" rel="nofollow">http://1.1.1.1</a>. And of course eventually I'll receive time out error message because old IP is no longer available.</p>

<p>I am using Apache web server, latest Wordpress 4.5, <a href="http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/hosting-wordpress.html#wordpress-troubleshooting" rel="nofollow">http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/hosting-wordpress.html#wordpress-troubleshooting</a></p>