Making the Blog Appear in a Non-Root Folder
This site will be customized as bellow:
- WordPress start at the site's root, https://www.ivanteoh.com/.
- The blog will be located at https://www.ivanteoh.com/posts/.
- The other pages, such as "about" page will be located at https://www.ivanteoh.com/about/.
To achieve the goals above, follow the steps as below:
- Create two more pages, "Home" and "Blog" beside "About" page in Manage > Pages > Manage Pages section.
- Write something on "Home" page. That will be my front page.
- Leave "Blog" page blank as it will be my posts page.
- Change the address to the site root directory's URL, https://www.ivanteoh.com/ in the box for Blog address (URL) of Settings > General > General Settings section.
- Update permalinks structure to begin with "/blog/" in Settings > Permalinks > Customize Permalink Structure > Common settings section. In my case, it would be "/blog/%year%/%monthnum%/%postname%/".
- Set "Home" as Front page and "Blog" as Posts page in Front page displays of Settings > Reading > Reading Settings section.
- Move the WordPress core files to the new folder. In my case, "blog" folder. I did this step in the beginnings of creating WordPress blog platform in my web hosting.
- Copy the index.php and .htaccess files from the WordPress directory ("blog" folder) into root directory of the site.
- Edit index.php in root directory with text editor.
- Change the line that says: require('./wp-blog-header.php'); to the following, using directory name for the WordPress core files: require('./blog/wp-blog-header.php');
- Save the file.
Gallery
Comments
Comments powered by Disqus