I have a website launch on sub domain (sub.domain.com
) and all working fine there. I transferred it to root address (domain.com
) by following steps.
- Downloaded all the file contents from sub domain directory.
- Uploaded all those content to root directory.
- Downloaded db script of the
sub.domain.com
install of WordPress. - Replaced all addresses from
sub.domain.com
todomain.com
by notepad - Uploaded this script as new DB and added credentials in
wp-config.php
of root domain’s WordPress.
The issue now I am facing is that it when I try to access the /wp-admin
of new root domainâs WordPress it doesnot accept them.
I created a admin user directly into db from this site, but it also is not working.
Whenever you move a WordPress site, you need to properly adjust configurations in your WordPress install in the
wp-config.php
file on the following variables:This will force your install to use the
domain.com
URLs. Also, when you do this the first time set theRELOCATE
setting totrue
like this:That basically tells WordPress to rejigger (thatâs my technical term for it) itâs stored settings for the new settings. And after you have reloaded your site & it works as expected, set
RELOCATE
setting back tofalse
like this: