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.
sub.domain.com
install of WordPress. sub.domain.com
to domain.com
by notepad 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:
define('WP_SITEURL', 'http://domain.com/wordpress');
define('WP_HOME', 'http://domain.com/');
define('WP_CONTENT_DIR', '/path/to/your/wordpress/wp-content');
define('WP_CONTENT_URL', 'http://domain.com/wp-content');
This will force your install to use the domain.com
URLs. Also, when you do this the first time set the RELOCATE
setting to true
like this:
define('RELOCATE', true);
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 to false
like this:
define('RELOCATE', false);
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.