$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'); ?>Change the subdomain?|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)

Change the subdomain?

matteradmin9PV0评论

I have setup a WordPress under a dev.example domain and then after developing changed the document root of the top level domain example to the WordPress installation.

Now some links are on dev. and when I login to admin, I get redirected to dev. as well. I changed all the links manually but the language switcher still remains on dev.

How do I solve this?

I have setup a WordPress under a dev.example domain and then after developing changed the document root of the top level domain example to the WordPress installation.

Now some links are on dev. and when I login to admin, I get redirected to dev. as well. I changed all the links manually but the language switcher still remains on dev.

How do I solve this?

Share Improve this question edited Feb 27, 2019 at 8:29 Krzysiek Dróżdż 25.6k9 gold badges53 silver badges74 bronze badges asked Feb 27, 2019 at 7:00 user6329530user6329530 1651 gold badge1 silver badge6 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

WordPress uses absolute links almost everywhere in its database. It means that if you want to change domain, you have to change all these links in DB.

The easiest way is to export DB to SQL, find and replace all occurrences of old URL with the new one. But... This can break your DB - some things are stored as serialized objects in DB and such simple change of strings will break these objects and make them impossible to unserialize.

Another way is to use tool like Interconnects Search Replace DB

Articles related to this article

Post a comment

comment list (0)

  1. No comments so far