WordPress subfolder installation
From Wiki @ Karl Jones dot com
Revision as of 11:08, 28 August 2016 by Karl Jones (Talk | contribs) (Created page with "This article discusses the installation of WordPress in a subfolder. == WordPress in a subfolder == It is common to install WordPress is a subfolder of a web server (rat...")
This article discusses the installation of WordPress in a subfolder.
WordPress in a subfolder
It is common to install WordPress is a subfolder of a web server (rather than directly in the root of the server).
You then create a document in the web server root named index.php, which serves as the home page. It contains PHP code to display the WordPress content.
This example assumes that the WordPress subfolder is named wp.
Making home page display contents of subfolder
In the root folder of your website,
<?php /**
* Front to the WordPress application. This file doesn't do anything, but loads * wp-blog-header.php which does and tells WordPress to load the theme. * * @package WordPress */
/**
* Tells WordPress to load the WordPress theme and output it. * * @var bool */
define('WP_USE_THEMES', true);
/** Loads the WordPress Environment and Template */ require( dirname( __FILE__ ) . '/wp/wp-blog-header.php' );