If the wordpress site/blog is inaccessible following a change in the IP or the hostname, use the following option to reset the siteurl in the database manually.
mysql> update wp_options set option_value='<new ip/hostname>' where option_name='siteurl';
This might not always be the case, as you might not always have direct access to the database on the web host. Refer to Changing The Site URL to get this done in various restricted environments.
There might be a case where the site/blog is up and running but you end up being unable to access the admin portal (wp-admin). Add the following lines to your wp-config.php to regain access.
define('WP_HOME','<new ip/hostname>'); define('WP_SITEURL','<new ip/hostname>');