Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Wordpress host IP changed

Tags:

php

wordpress

I've got a Wordpress site on our home intranet that has run into trouble now that the IP address has changed - The index page loads, but not the CSS and I can't log in to the site administration panel.

Unfortunately I am a bit behind on backups. Is there a way to get Wordpress to refer to the new IP address?

like image 895
Andrew Avatar asked Feb 11 '09 05:02

Andrew


People also ask

How do I change my WordPress IP address?

Since you cannot open the admin side of wordpress, open the database in phpMyAdmin(or something similar). The options can be found in the 'wp_options' table(wp_ prefix might be different). Find the necessary setting using this query... Change the values of both the options to the new IP.

Why is WordPress blocking my IP?

IP Address blocking is an essential part of WordPress security. It typically happens after several incorrect login attempts. At times, other factors such as outdated cookies etc. in your web browser; or even an IP address assigned to you by your ISP – can cause the block to happen.

Does WordPress save IP addresses?

By default, WordPress logs and stores IP addresses of users leaving comments on your website. These IP addresses are permanently stored in your database.


2 Answers

You have two places to update this (well three, but we'll stick with the two).

If you can still log into your admin section, type the following for your URI /wp-admin/options.php - so for example, if your site is http://localhost then your full URL will be http://localhost/wp-admin/options.php. Once you've logged into your site you should see two fields (well you'll see a lot of fields), but you'll want to look for the two with URL's in them - the Site URL and the Blog URL (in WP 2.7 the fields are labeled "home" and "siteurl", not sure on the other versions).

Or, you can log into MySQL database and run the following.

Select * from wp_options where option_name IN('siteurl','home');  

I just ran this today on one of my installs. If you're option_value is set to your localhost - you can then run the following:

update wp_options set option_value='http://www.yourblogname.com' where option_name = 'siteurl'; update wp_options set option_value='http://www.yourblogname.com' where option_name = 'home'; 

This should update your table structure.

like image 112
Schoffelman Avatar answered Sep 22 '22 05:09

Schoffelman


You have to change the 'home' and 'siteurl' in the settings. Since you cannot open the admin side of wordpress, open the database in phpMyAdmin(or something similar).

The options can be found in the 'wp_options' table(wp_ prefix might be different). Find the necessary setting using this query...

SELECT * FROM `wp_options` WHERE `option_name` IN ('siteurl', 'home') 

Change the values of both the options to the new IP.

like image 29
Graeme Avatar answered Sep 22 '22 05:09

Graeme