Support » Installing WordPress » Forwards to old domain

  • Hi. I’ve never used wordpress before, but this non-profit group I’m helping out had a wordpress site, and they stopped paying for hosting. So they wanted me to transfer the old site over to a new domain. I tried just transferring over the files and going into wp-config.php and changing the database name, user name and password, but when I try to visit the new domain it just forwards over to the old domain. How can I stop this from occuring?

    New domain:
    Old domain:


Viewing 13 replies - 1 through 13 (of 13 total)

    Ok, so I just went into the database and changed all the urls to the new domain, and success!

    However, now I’m getting a few errors:

    Warning: array_keys() [function.array-keys]: The first argument should be an array in /home1/zoyboyco/public_html/glean/wp-includes/widgets.php on line 676
    Warning: Invalid argument supplied for foreach() in /home1/zoyboyco/public_html/glean/wp-includes/widgets.php on line 676

    Do I have to manually install the widgets through wordpress?

    My links are all broken too. I’m guessing I’m able to change this in administrator mode?

    Is there a way to set up a new admin user name and password?

    Thanks in advance.

    Does anyone have any suggestions of something I can try?

    This replies to your first posting.

    If you import the whole database, you need to go into option table to change siteurl and home

    Look for siteurl and home under option name and change old domain url to new domain url.

    Once you are able to go to your new blog, then you go into your database and use a query to change all your image and link url in your post or page.

    Hope this helps!

    Moderator Mark Ratledge


    Forum Moderator

    Fiockthis: deactivate plugins and widgets and see if you get the same error. Reactivate one by one until you get the error. Upgrade the custom-field-taxonomies plugin if you use it.

    If none of that works, see this thread: WordPress › Support » Warning: array_keys() [function.array-keys]:

    Thanks denzel and song dog.

    Where is option table at?

    Is there a way to create a new admin account? I don’t even know where i’d go to log in.

    Moderator Mark Ratledge


    Forum Moderator

    Your login will be but that doesn’t yet work as you need to fix the options table first.

    Why do you need a new admin account? Are you locked out of the exisiting account? If so, Emergency_Password_Reset_Script « WordPress Codex

    The options table will be listed with the other tables in phpmyadmin.

    After you can login, you can use a plugin like Search RegEx to change URLs in posts and pages: Search RegEx.

    You also need to delete your .htaccess file, as your other pages are throwing 404 errors. And you may need to delete permalink settings in the database, but first delete .htaccess and see if that fixes the page links.

    Wow, thanks for such a quick response.

    I went into the wp_options table and the site url has already been changed to the new url.

    I could probably get the old admin name and password, but with all the people I need to go through it would take a while. It’d probably be easier if I just set up a new one.

    I deleted my .htaccess file, but I still can’t get the links to work.

    Moderator Mark Ratledge


    Forum Moderator

    Hope this all works…. You have a login page now, with the array key errors still. But we’re making progress.

    A few things going on:

    There’s a 99% chance the login is admin, as that’s the default login for any WP install. So try the emergency password reset script above to get a new password for the exisiting account. Then you can change the other account info when you’re back in.

    And since permalinks are still broken, go back to options in the database and clear the permalinks settings, which is usually at ID 34. I’ve had to do that once or twice in the past when permalinks were still broken after deleting htaccess.

    Thanks a lot!

    I believe I was able to log in, but it doesn’t show anything but those same 4 errors, and 2 new ones below them:

    Warning: Cannot modify header information - headers already sent by (output started at /home1/zoyboyco/public_html/glean/wp-includes/widgets.php:676) in /home1/zoyboyco/public_html/glean/wp-includes/pluggable.php on line 557
    Warning: Cannot modify header information - headers already sent by (output started at /home1/zoyboyco/public_html/glean/wp-includes/widgets.php:676) in /home1/zoyboyco/public_html/glean/wp-includes/pluggable.php on line 694

    Links are no longer broken though!

    Thanks for working me through this. I appreciate your time and knowledge.

    Moderator Mark Ratledge


    Forum Moderator

    Glad it worked. You’re almost done. Now you can go to that WordPress › Support » Warning: array_keys() [function.array-keys]: link I posted above and go into the database to fix the errors that cause those warnings….

    You sir are a gentleman and a scholar.

    Thank you very much for being so patient and sharing your knowledge with me.

    You are the man!

    Moderator Mark Ratledge


    Forum Moderator

    Glad that worked out; it can be a long process sometimes. I do a little work for a gleaning project in Montana, picking fall fruit to keep the bears from coming into town to get it….

    Very cool!

    Thanks again

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Forwards to old domain’ is closed to new replies.