Struggling to migrate WP to a different domain
-
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.phpdefine('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
- The topic ‘Struggling to migrate WP to a different domain’ is closed to new replies.