WordPress slow and incomplete loading

2 weeks ago I had tested a WordPress forum on my computer using a static IP address (2.231.211.12/wordpress/) and it worked perfectly.

Now I moved and I have got a dynamic IP address (the address is constantly updated on http://doghot.altervista.org/ip.txt), mantaining the same computer.
For example, in this moment the forum’s address is http://82.53.112.71/wordpress/

Read More

My problem is that when I load the forum with my browser some things are uploaded and other things are not. The latters are images, css, etc. and they try to be loaded from my past IP address (2.231.211.12), as you can see in the source code (once the loading has done), like if somewhere there was an absolute path that force them to load from there.

I say “once the loading has done” because, since some things try to be uploaded from 2.231.211.12, the whole loading has to wait the connection to 2.231.211.12 to be refused. It takes 2/3 minutes.

I can’t understand where WordPress reads that IP (that is not mine anymore!), and I’m not able to analyze the source code to find the problem.

May you help me?

Related posts

Leave a Reply

2 comments

  1. This has happened to plenty of people. There are plug-ins for wordpress for migrating or changing ip address if you want a gui to do it. I prefer to log right into mysql and issue the following:

    issue this sql:

    SELECT * FROM wp_options WHERE option_name IN (‘siteurl’, ‘home’)
    then

    change the values of both the options to the new IP or Domain Name (recommended).
    

    or you can do the following if you don’t have db access:

    use this code in your wp-config.php:
    
    define('WP_HOME','http://ip_or_domain.com');
    define('WP_SITEURL','http://ip_or_domain.com');
    

    or you can add this to your functions.php:

    update_option('siteurl','http://ip_or_domain.com/');
    update_option('home','http://ip_or_domain.com/');
    

    if you have the ip in your cms content issue this following sql:

    UPDATE wp_posts SET post_content = REPLACE(post_content,”http://old_ip_or_domain.com“,”http://new_ip_or_domain.com“)

  2. WordPress was not designed to work on a system without a domain name. For an image (attachment), it stores the full URL of the image, including the domain name. So, in your case, it will be storing an IP address that will soon be invalid (as you have seen).

    If you intend to keep using an ever-changing IP address, I suggest that you either:

    1) Get a domain name and change the IP address for the domain whenever your IP address changes, or

    2) Use PHPMyAdmin or similar to change the old IP to the new IP in the WordPress database whenever the IP changes.