Forums

Changed databases, WP still updating the old one (8 posts)

  1. maggieonline
    Member
    Posted 2 years ago #

    I changed hosting companies a few months ago but kept the same URL. Moved my blog to the new hosting company.

    A couple of days ago I went into the new database and realized that wordpress is updating the old database on the old hosting company server not the new one.

    I checked to be sure and YES the wordpress blog IP address is the new IP address I was assigned by the new hosting company. I know it's in the right place.

    Now I have two problems.
    1. How do I tell wordpress to use the new database not the old one?
    2. How do I get my blog back in sync? I'm assuming I'll have to start over again by deleting the new database and importing the files from the old database which now has all my newer entries in it. (Unless there's an easier way)

    Thanks for any help.

  2. maggieonline
    Member
    Posted 2 years ago #

    I modified the wp-config.php to show the new database. Still not working. So I deleted the wp-config.php and tried to run the wp-admin/install.php again.

    It gives me the message that it can't contact the old database server. Where else is that information stored so I can change or delete it?

    Thanks again for the help

  3. songdogtech
    Member
    Posted 2 years ago #

    I checked to be sure and YES the wordpress blog IP address is the new IP address I was assigned by the new hosting company. I know it's in the right place.

    What IP address are you talking about and where exactly did you enter it?

    Did you change DNS at your domain registrar a few months ago to point to the new hosting company?

  4. maggieonline
    Member
    Posted 2 years ago #

    Hi. Yes I changed the DNS and it is pointing correctly. Thanks for asking. Also I am looking at the wp_config.php file and it shows the correct database name etc. Or it did until I deleted it thinking I could start with the install.php again.

    That's when it told me it was still looking at the old database.

  5. songdogtech
    Member
    Posted 2 years ago #

    I'm lost.

    A couple of days ago I went into the new database

    How did you do that? With phpmyadmin?

    That's when it told me it was still looking at the old database.

    What exactly did it say?

  6. maggieonline
    Member
    Posted 2 years ago #

    Yes. I went into the new database with phpmyadmin. I browsed the posts file. It didn't have any of my new posts. So then I went to the old hosting company (it's still an active account even though I'm not pointing my DNS there) and also logged into phpmyadmin and browsed the post file. There were all the most recent posts.

    I went back to wordpress and checked and found I hadn't configured the wp-config.php file to point to the new database. So I pointed it.

    It gave me an error saying it couldn't log into the old host like this
    Error establishing a database connection
    This either means that the username and password information in your wp-config.php file is incorrect or we can't contact the database server at OLD DATABASE SERVER. This could mean your host's database server is down.

    •Are you sure you have the correct username and password?
    •Are you sure that you have typed the correct hostname?
    •Are you sure that the database server is running

    Next I deleted the wp-config.php file entirely and tried running the wp-admin/install.php

    I got the EXACT same error.

    Where is the old database information stored besides in the wp-config.php?

    In the meantime I've deleted ALL of the wordpress files and am reloading them all over again which is a pain in the neck with my satellite connection on a cloudy day but I need my site up and running.

    In addtion I once again exported the files from my old database and then created a new wp_database on my new server and am importing the old files.

    Does this make sense? Thank you again for looking at this.

  7. maggieonline
    Member
    Posted 2 years ago #

    NEVER MIND! It turns out that the dedicated IP address I was assigned is no longer the one my site is using - not sure why but I just spent hours changing files on one ip address and my site actually has another ip address assigned - and the old files are still there. How did I find out? I looked at my ftp login info and changed the ftp site to the site name rather than the asssigned ip address.

    And yes I FTP to the IP address rather than the URL because when you move a site you can't log in to your URL until you have the site set up and the DNS updated but by the time I've done that I'm too lazy to go back into my ftp software and change my login stuff.

    I will be contacting my hosting company who took my money to assign me dedicated, non-numerical order ip addresses and have at some point changed them. I will of course be polite since you drown more flies with vinegar than with honey or some such nonsense but I am a tiny bit irrirated at the waste of a morning and also your time, good sir

    Sorry to have been a bother.

  8. songdogtech
    Member
    Posted 2 years ago #

    It seems like it's what you discovered, but I was thinking that it was because - for various reasons - you can't access a mysql database from a different domain. If it turns out differently, you'll have to export your old database and then import it at your new host.

Topic Closed

This topic has been closed to new replies.

About this Topic