In the abc.com domain name built a wordpress station, under the Abc.com/def also built a WordPress station.
Now want to move abc.com/def to abc.com as the main station, that is, open abc.com after access to the content of the original abc.com/def.
How do I ask?
Reply content:
In the abc.com domain name built a wordpress station, under the Abc.com/def also built a WordPress station.
Now want to move abc.com/def to abc.com as the main station, that is, open abc.com after access to the content of the original abc.com/def.
How do I ask?
Just move one file:
- Move the index.php in the Def directory to the root directory, which is the directory accessed by abc.com, and make sure that abc.com is turned on index.php, not index.html;
- In the index.php under the root directory:
require( dirname( __FILE__ ) . '/wp-blog-header.php' );
Change to:
require('./def/wp-blog-header.php');
Add the following code in def/wp-config.php:
Define (' Wp_home ', ' http://abc.com ');
Define (' Wp_siteurl ', ' http://abc.com/def ');
Define (' Cookie_domain ', ' abc.com ');
Define (' Wp_content_url ', ' http://abc.com/def/wp-content ');
Define (' Wp_plugin_url ', ' http://abc.com/def/wp-content/plugins ');
- All the files move under Webroot.
- Modified. htaccess
- Modify DB URL Record