WordPress, install in subfolder, and access at site root

Took a while, but I found the information that I was looking for.  What I want to do was install wordpress in a subfolder (www.ammail.net/wordpress) and have the ability to run wordpress from the site root (www.ammail.net/).

To accomplish this I needed to perform the following steps.  Assuming you’ve downloaded and installed or at least copied wordpress to a subfolder:

1. Edit wp-config.php to add the following configuration
// ** Hostname settings ** //
define(‘WP_SITEURL’, “http://${_SERVER['SERVER_NAME']}/wordpress”);
define(‘WP_HOME’,    “http://${_SERVER['SERVER_NAME']}”);
2. Copy the index.php to the root directory and change the following line:
/** Loads the WordPress Environment and Template */
require(‘./wordpress/wp-blog-header.php’);


This entry was posted in wordpress. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>