• I was doing a “dress rehersal” for moving my WordPress blog to a new server and domain. I was following the instructions here, which say to do the following:

    Go back to your OLD blog and go to options and change the url (both of them) to that of your new site.

    As soon as I did this, my blog was broken and I got a “couldn’t connect to database” error. Thankfully, I had a local copy of the mysql database, so I uploaded that via myphpadmin and all was well again.

    So, as I’m looking for instructions on how best to move my blog to a new server & domain, I would like some clarification, as following the WordPress documentation broke things ??

    (Sorry if this comes across as a rant, it isn’t at all. In fact, I love WordPress, and I love how you’ve made it so easy for people to set up a sophisticated and professional looking website)

Viewing 7 replies - 1 through 7 (of 7 total)
  • Seemingly you are one of those who never reads the instructions till the end:

    Part B – Restoring Your Old Blog
    1. On the original server, delete your OLD blog’s database (remember, you should have a copy on your local computer that you made at the very beginning).

    3. Upload your OLD blog’s database from your local computer to the server. That should do it!

    On the other hand, I’d agree that those instructions are one of the most confusing sections of the Codex, and they are unnecessarily over-complicated.

    I’d do this:
    backup the DB and the WP files
    upload the files to the new server (not install)
    import the DB to the new server via phpmyadmin, and
    in the wp_options table edit the “site_url” and “home” values to reflect the new location

    it should work!

    Thread Starter digitalranger

    (@digitalranger)

    Thanks for the reply.

    Regarding your quote, it isn’t I didn’t read the instructions to the end. On the contrary, I wanted to get things exactly right, I lost count of the number of times I did read it, none of which times it made total sense to me. Although it was at the point I quoted that things completely de-rail, because once I do change the two URL fields, it’s game over because I can’t do anything else, the blog doesn’t even reload. So anything else that the instructions tell me to do with the old blog isn’t possible. [i]Unless[/i] I’m missing something.

    I’ve been doing a rehearsal by running Xampp on my XP laptop and trying to migrate the blog to local, here’s the procedure I came up with:

    1. Use the wp-db-backup plugin to download a copy of the blog’s mysql database.
    2. Open the database in a text editor and replace every instance of “mydomain.com” with “localhost/wordpress”.
    3. Goto myphpadmin on my localhost server, create a database called “wordpress” and import the modified mysql database into it.
    4. Download my entire wordpress installation from this server to the corresponding folder in my xampp installation.
    5. Edit wp-config.php with the new database details. (In the case of running a local server, user=root and password is null).This is enough to get the blog working, but permalinks need fixing.
    6. Delete the .htaccess file.
    7. Go into the WordPress dashboard (of local copy) and set the permalink options, which regenerates a .htaccess file. (As a belt & braces approach, also use the custom permalink structure input line with “index.php/” at the start of your desired permalink structure).

    And did your 7 items list work? If yes, then great.

    And regarding those instructons: they tell you at the end to replace the ‘changed’ database with your very original backup. For that you would NOT need to access the admin panel, and it should work.

    Taking a second look at it – it seems the author tried to put together a process for those users that are not capable to edit the .sql file(s) or messing with the DB tables in phpmyadamin.
    And keep in mind also that those steps are recommended ONLY if you want to keep the old blog, too. Which usually doesn’t make sense, if you are moving it: the search engines would penalize you for duplicate content.

    As soon as I did this, my blog was broken and I got a “couldn’t connect to database” error. Thankfully, I had a local copy of the mysql database, so I uploaded that via myphpadmin and all was well again.

    Moving wordpress is pathetically simple, and the instructions overcomplicate it.

    Assume the new domain is live (your DNS has propagated).

    1. upload files.
    2. Import db from old site.
    3. edit wp-config.php to match new db settings
    4. while you’re still in the database, edit the 2 options inside the options table that tell WP where your site and the files are.

    Rehearsing something so simple is okay I guess, lots of people have trouble with it. Why, I dont know.

    I can do ALL of the above is less than 10 minutes, and not have a single problem.

    I have been asked to install wordpress for a client who has not had the foresight to backup the database to his PC prior to changing hosts.

    Thus could anyone help me, can i simply contact the old host and ask them to send me a copy of the database or does it have to be backed up via the wordpress installation on the old server?

    TIA

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.remarpro.com Admin

    How you get a copy of the database doesn’t make any difference. As long as you get a copy of it.

    If your old host has already eliminated the account, then they likely deleted the database too. But you can try to check with them. Might work.

    Whooami is correct with one small caveat. There are THREE field values to edit in the options db. You also need to correct the upload path.

    Thanks.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Moving WordPress to a new server & domain’ is closed to new replies.