Change the subdomain?

admin2025-06-02  1

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

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1748861142a314330.html

最新回复(0)