Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
521 views
in Technique[技术] by (71.8m points)

php - Website in wordpress redirects to old URL after migration

I had never done migrating a site on wordpress, I'll put step by step how I did, need to put the site on a new domain that are on the same server, so only the migrated files, the database is equal.

I copied all the files from the old wordpress to the new site folder, I had the following result on the new site: Home - The site carries the theme but a message appears: 404: PAGE OR FILE NOT FOUND. newsite/wp-admin/ - redirect to oldsite/wp-admin/

I have the option in the site administrator old put the new URL but I'm afraid I could never access. it can go?

Thanks.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

I've solved my issue with my solution at No# 04 See below what I tried:

1- Make sure Database wp_option links are set

/* MySQL: */
update wp_options set option_value = 'http://example.com' where option_name = 'siteurl';
update wp_options set option_value = 'http://example.com' where option_name = 'home';

2- Additionally define url in wp-config.php file

define('WP_HOME','http://example.com');
define('WP_SITEURL','http://example.com');

3- Clear cache of from server

4- Clear your browser cache & history (Hurray!!! it solved my issue no redirection)

On Chrome, Navigate to chrome://settings/clearBrowserData and clear image and file cache.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...