Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!

Author Topic: Point Wordpress Site to root directory  (Read 2574 times)

0 Members and 1 Guest are viewing this topic.

Vinil

  • Guest
Point Wordpress Site to root directory
« on: December 11, 2013, 04:19:30 am »
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:

Quote
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.

Quote
# 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.