Wordpress Permalinks Issue on Copied Site

efeezy

New member
Oct 5, 2007
5,250
136
0
50
Hopefully someone can give me hand on this because I'm losing my mind on this project.

I've got a Wordpress site that was copied over to a new server, with a new domain name. All of the WP files were copied exactly, the SQL database was also exported, all instances of the old URL were replaced with the new domain in the database. Typical wp site migration.

Everything was uploaded to the new server/host & the edited .sql file was imported to the phpmyadmin panel.

The site resolves to the new domain no problem, however every single internal link on the new domain is still pointing to the old domain's posts & pages.

I've searched the entire database file and there's not one instance of the old domain on any table. It's 100% clean. I've installed a clean version of wordpress on the new server. Checked there's no redirect in .htaccess or at any kind of forwarding at the hosting level.

When I try to login to the new domain with www . newdomain.com/wp-admin, I get redirected to the wp login for the old site. www . newdomain.com/wp-login doesn't work either.

I've renamed the plugins folder just in case there was a conflict there, and that did nothing. I removed the theme that was being used, hoping it would just go back to the default theme, but now I just get a white page when I go to the new domain. If I reinstall the old theme, it come back, but the permalinks are still going to the old site.

Is there anything I'm forgetting to check. It must be something simple, because I've looked at all the normal causes of this type of problem.

If you want to see the domain, shoot me a PM and I'll send it over. Thanks.
 


Look in the "General" settings in the dashboard and make sure the Wordpress Address and Site Address are correct

I can't get to the WP dashboard of the new site because www . newsite.com/wp-admin redirects me to the wp login for the old domain.

I'm just realizing though that when I go to wp_options and change the site URL from the old domain to the new one and save it, when I go back into wp_options, it's reverting to the old domain url for some reason. Why the fuck would it do that after I change and save it?
 
What are you using to export/import the site?

Just doing it manually.

Now that I see the wp_options siteurl line won't save the new domain url, that has to be the reason it's redirecting everything. I've never seen it do that before, so I'm not sure what to do so it saves the new url.
 
I would try reinstalling Wordpress on the new site and then doing a Tools > Export on the old site and then Tools > Import on the new site.

I know I've had this problem before it's just been a while so I'm not sure exactly what I did.
 
I would try reinstalling Wordpress on the new site and then doing a Tools > Export on the old site and then Tools > Import on the new site.

I know I've had this problem before it's just been a while so I'm not sure exactly what I did.

Will try that. Thanks.
 
Have you read the codex? they explain the whole process, look
Changing The Site URL « WordPress Codex

If you want to read more: Moving WordPress « WordPress Codex

Basically you have to change siteurl field in wp_options table, either by phpyadmin or console
Changing The Site URL « WordPress Codex

Just to make sure, use the search and replace plugin
http://wordpress.org/extend/plugins/search-and-replace/

This guide is kickass and covers everything from scratch
http://yoast.com/move-wordpress-blog-domain-10-steps/

If you need more help, PM and I'll gladly help you
 
^^ On it as we speak. I've never had this happen before on a wp migration. Hopefully this will get it fixed up. Then again the client has it on godaddy hosting, with no cpanel access and it's a stupid hosting setup if you ask me, but I'm sure I'll get it worked out now. Thanks.
 
Got it all squared away with the help from everyones suggestions. Thanks again.
 

Problem with WPTwin is it deletes every table in the database when copying a site. So if you're running multiple sites on the same database, say goodbye to your other sites.

Anyway, to fix go into phpMyAdmin, and you want the 'wp_options' table. Search for two rows with the 'option_name' column that is "home" and "siteurl". Change the value of those two rows to your new domain name, and everything should work fine.

If it doesn't work, then you also need to update the option_name "dashboard_incoming_links". That will be a bit of a fuckup for you though, as it's a PHP serialized string. If you need assistance, drop me a line with your cPanel info, and I'll fix it for you.
 
From experience this is the way I do it:

1. Copy all files and database to new server
2. Using phpMyadmin edit the wp_options table and change the 'siteurl' and 'home' to the new domain.
3. This should get you into the backend of the new domain
4. Install the 'find and replace' plugin
5. Do a search and replace for all instances of the old domain to the new.

There's probably easier ways to do this but it works either way.