• Henry

    (@voodoohoodoo)


    Hi all, I know there is a lot of documentation regarding this in the WP Codex and it is a common problem/task but this has really stumped me.
    Right.
    My wordpress site has changed servers and URLs. The old site had a different URL but was always being forwarded to the new URL. Now this new URL has been assigned a new server so I need to move the site across.
    I have a backup of the old site – everything. I installed WordPress on the hosting account which is 123-Reg. Then via FTP I uploaded and overwrit the new installation with my back up. I am not sure this was the way to do it properly but seemed to make sense.
    Now, I have to do something with the database but I just cannot figure it out. Do I need to upload the old database to the new server or can I create a new one which copies the old one?
    I am really confused as to what to do next. All I have is the old “Error establishing a database connection” notice.
    Sorry if this is an obvious problem but after having gone through the Codex instructons and searching I still cannot work it out.
    any help in this matter would be much appreciated!!
    Thanks for reading
    Henry

Viewing 14 replies - 1 through 14 (of 14 total)
  • For the new server you need to create a new database and import the old db content into it. The easiest way is to use phpMyadmin.
    To connect the site files to the new db and allow access, see this:
    http://codex.wordpress.org/Editing_wp-config.php

    Thread Starter Henry

    (@voodoohoodoo)

    Ok thanks tried this just now and it did not work.
    I created a new database and uploaded the SQL file in PhpMyAdmin.
    It uploaded but and nothing else happened. Site still does not work.
    It says there are no tables in my database. It did not seem to make any difference after I uploaded

    Try this

    Did you export the database or are you using the same one? If you did, you will need to make sure you change your settings first.

    Dashboard > Settings > General

    Then under WordPress Address (URL) and Site Address (URL) Change the address to http://www.yoursite.com. Then you can export the database.

    If not, go into your database and then change the following

    in your ‘options’ table change siteurl – option value to http://www.yoursite.com

    then on the next page, change the home – option value to
    http://www.yoursite.com

    After you do that, change the values in your wp-admin settings like I said in step one

    “It says there are no tables in my database.”
    Then the import didn’t work or the .sql file was empty or possibly corrupted. Was there an error message? Sometimes mySQL is fussy about file formats/size etc.

    Thread Starter Henry

    (@voodoohoodoo)

    Well it said it had imported ok, gave me the green tick. Just didnt do anything else.
    Maybe it is empty..I have a couple of other sql files but I think the one I uploaded is the correct one as I noted down when I created the database. I cannot access the old site anymore since it has closed.
    Urgh it is so annoying!

    How did you export the database?

    Thread Starter Henry

    (@voodoohoodoo)

    Well actually I did not export the database manually – I was not dealing with the admin of the old site. Someone had it closed and the hosting people provided a back up of the site which was passed onto me.

    Thread Starter Henry

    (@voodoohoodoo)

    The database was exported by the 123-Reg server people. It would have been exported not by PhPAdmin but with the backup of the whole wordpress site

    So it was a zip file and you extracted the sql file? When you hover over it what size is it? When you go to import it in phpMyadmin, take note of:
    File may be compressed (gzip, bzip2, zip) or uncompressed.
    A compressed file’s name must end in .[format].[compression]. Example: .sql.zip

    Thread Starter Henry

    (@voodoohoodoo)

    No it was not a zip file. Ends in SQL. It was never a zip file.
    When I hover over it the file size is 0KB – meaning it is blank?

    I’m afraid so. Even a small db in gzip format I have here clocks in at 160kb.

    Thread Starter Henry

    (@voodoohoodoo)

    Thats crazy. I have no idea why it would be blank..

    Where was the old site hosted? If it’s a reputable host, you may be able to get them to recover the db.

    Thread Starter Henry

    (@voodoohoodoo)

    Thanks. The old site was hosted on 123-Reg.(I believe it is UK) Same hosting as the new site its just a different web address. I wasnt dealing with the account and the closure of the old site (I just made it) I just recieved from my client a backup that the host had provided in closing the old site

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Moving WordPress to another server trouble’ is closed to new replies.