• I’ve always had two domain names for my site, one hyphenated, one not. For some reason I’ve always used the hyphenated version, the other has a 301 redirect to it. Recently all my literature uses the other. It’s no problem everyone who visits gets taken to the correct place.

    I’m just finishing a redesign, and thought it a good time to switch to the other domain. I can get everything working live, I thought, then remove the redirect when I’m ready to show the world!

    WordPress is just one folder within my html site. So I asked my hosting provider if they could migrate the whole site over for me.
    Wordpress however isn’t working.

    The support guy (very kindly) checked over any files he thought might refer to the wrong site. It was only when I removed the redirects that it stopped working. Various files (Or perhaps the whole thing, as I was using a .* so all references, files and links to the new site).

    I used “DATABASE SEARCH AND REPLACE SCRIPT IN PHP” to replace all references throughout the WP databases with the new domain.
    I added lines of text to wp-config.php

    define('WP_HOME','https://www.lavenhamphotographic.co.uk/blog');
    define('WP_SITEURL','https://www.lavenhamphotographic.co.uk/blog');

    and lines to the beginning of php/functions.php

    update_option('siteurl','https://www.lavenhamphotographic.co.uk');
    update_option('home','https://www.lavenhamphotographic.co.uk');

    Just after the <?php though I understand these need to be removed once it’s working.

    Visiting the new site’s blog (https://www.lavenhamphotographic.co.uk/blog) Does load a working page. Even searching (Try a venue ‘Leez’ for example) does load search results. However clicking on a search result brings up a file not found.

    Trying to log in does bring up the login (Even a password reset request worked) but once I get the password right, I get a 500 internal script error.

    I’m clearly very close! What else do I need to update??

    Any help?

    I guess I could scrap the new domain and continue on the working one. or perhaps just use the working one for the blog section of the site, but I’d like to get rid of the hyphenated name now, it’s a bit 90’s!!

    Many Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • Have you chose which permalink (Dashboard — Settings — Permalinks) structure you are going with?

    Thread Starter b3nb123

    (@b3nb123)

    I can’t log in to do that!!!! I did add lines to php/functions.php that specified the site root and the WP root. Didn’t help unfortunately.

    i did contact the hosts again, and he’s advised I use a plugin called velvet blues to change all links. He apologised he should have told me this yesterday! (I spent hours trying things!)

    Sounds like you need to edit the database to reflect the changes of address. Yes, the the code you did input is one way, but I would recommend following these steps.

    Thread Starter b3nb123

    (@b3nb123)

    Thanks Brett, cheers for the link… I’ll look into that if the advice I’ve been given from the hosting support doesn’t work

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Struggling to migrate WP to a different domain’ is closed to new replies.