Wordpress PHP Issue

Discussion in 'PHP' started by UKmember, Oct 12, 2014.

  1. #1
    Hello,

    Basically I am copying a site clubactivoroadcycling to clubactivocycling.com I have managed to copy the files, create a new database and uploaded the database so it looks good however when I go to login with clubactivocycling.com/wp-admin.php it redirects me to the other domain name.

    How can I set this right?

    Hope you can help.

    Cheers
     
    UKmember, Oct 12, 2014 IP
  2. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,623
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #2
    Check the settings in the Wordpress-admin-interface - you should have settings for the domain-name, and such there. Check to see if this has been set up with the old information (from the earlier domain).
    You should also go through the content in the database (just do it in a text-editor, on the backup-SQL-file and replace all the clubactivoroadcycling.com with clubactivocycling.com) - that will fix any hard links you may have as well.
    If neither of these work, you probably have a hard-coded redirect somewhere in the template-files.
     
    PoPSiCLe, Oct 12, 2014 IP
    sarahk likes this.
  3. pienisieni

    pienisieni Active Member

    Messages:
    30
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    53
    #3
    Go to phpmyadmin in your cPanel. Assuming you have one.

    Select your database and search for your old domain name from the tables, and edit them to reflect to your new domain.
    [​IMG]

    [​IMG]

    [​IMG]
     
    pienisieni, Oct 12, 2014 IP
    Anveto and ThePHPMaster like this.
  4. Ray Baron

    Ray Baron Member

    Messages:
    148
    Likes Received:
    10
    Best Answers:
    3
    Trophy Points:
    43
    #4
    The previous answer is great, as far as it goes.

    Depending on how you use widgets and short-codes, you may also need to run the database through a migration tool. Widgets and short-codes are encrypted so you can't just search and replace the domain or path information. Migration tools will translate them for you as the database is exported.

    There are others, but this is my favorite:

    https://deliciousbrains.com/wp-migrate-db-pro/
     
    Ray Baron, Oct 13, 2014 IP