$conf, $runtime; function_exists('chdir') AND chdir(APP_PATH); $r = 'mysql' == $conf['cache']['type'] ? website_set('runtime', $runtime) : cache_set('runtime', $runtime); } function runtime_truncate() { global $conf; 'mysql' == $conf['cache']['type'] ? website_set('runtime', '') : cache_delete('runtime'); } register_shutdown_function('runtime_save'); ?>migration - Transfer of wordpress site from one domain and server to another domain and server|Programmer puzzle solving
最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

migration - Transfer of wordpress site from one domain and server to another domain and server

matteradmin8PV0评论

I have moved a wordpress site from one domain and server to another domain and server. Everything looks fine except all the links within the site are still pointing to the previous domain. Please let me know what went wrong with the transfer. I'll really be thankful for the kind response and help.

I have moved a wordpress site from one domain and server to another domain and server. Everything looks fine except all the links within the site are still pointing to the previous domain. Please let me know what went wrong with the transfer. I'll really be thankful for the kind response and help.

Share Improve this question asked Mar 25, 2013 at 16:44 user1666698user1666698 354 silver badges11 bronze badges
Add a comment  | 

2 Answers 2

Reset to default 2

Most probably, nothing went wrong, you just have to set some things to the new server.

Firstly, there are the home and site urls (to be found in the general settings).

Then, possible absolute links pointing to the old domain have to be adapted.

To change these links, you have to adapt the SQL table.

Update options (this can also be done via the general settings, as described above):

UPDATE wp_options
SET option_value = replace(option_value, 'http://old-domain', 'http://new-domain')
WHERE option_name = 'home' OR option_name = 'siteurl';

Update absolute links inside posts:

UPDATE wp_posts
SET post_content = replace(post_content, 'http://old-domain', 'http://new-domain');

You probably need to log into the admin portal (www.yoursite/wp-admin) and change the site's address under settings >> general >> wordpress address.

Hope that helps

Post a comment

comment list (0)

  1. No comments so far