Giving WordPress Its Own Directory
Many people want WordPress to power their site’s root (e.g. http://example.com) but they don’t want all of the WordPress files cluttering up their root directory. WordPress allows you to install it into a subdirectory, but have your blog exist in the site root.
The process to move WordPress into its own directory is as follows:
- Install duplicator on WP
- Create a new package using duplicator
- Download installer.php and package
- Create a wordpress under the root folder on the new server
- Put the installer.php and package under /wordpress folder
- Use phpMyAdmin or mySQL to create a new database for WP
- Go to http://domain.com/wordpress/installer.php to install WP
- Go to WP settings–General–Site Address (URL), if grey-out, go to edit the wp-config.php.
- Delete “WP_SITEURL” and the “WP_HOME” values.
- Change Site URL to: http://domain.com
- COPY index.php and .htaccess to root folder
- MOVE wp-config.php to root folder.
- Change the following and save the file. Change the line that says:
require( dirname( __FILE__ ) . ‘/wp-blog-header.php’ );
to the following, using your directory name for the WordPress core files:
require( dirname( __FILE__ ) . ‘/wordpress/wp-blog-header.php’ );