Sometimes we install Wordpress into a subdirectory (Example:
http://example.com/wordpress) and we need to point the site as "
http://example.com" having your blog exist in the site root. To perform this,
1). Login to your Wordpress Admin area and go to the
General panel.
2). Update the following boxes as like below:
WordPress address (URL): http://example.com/wordpress
Site address (URL): http://example.com
3). Save it.
4). Now login to the server and goto the user's account.
5). Copy the
index.php and
.htaccess files from the WordPress installation directory into the root directory (html) of your site.
6). Edit your root directory's
index.php. # vim index.php
Change the line that says:
require('./wp-blog-header.php');
to the following, using your directory name for the WordPress core files:
require('./wordpress/wp-blog-header.php');
save it.
7). If you have set up Permalinks, go to the Permalinks panel and update your Permalink structure. Make sure if the
.htaccess file has the write permissions, so wordpress can update the file automatically.
That's it.