• I installed WordPress into the root of my site, but I want the index page to be static and the blog to be in a subfolder. I successfully modified the index page the way I want it, but I’m having trouble setting up the subfolder for the blog. I created a subfolder named “blog” and copied the index.php file into it. However, the browser is giving me an error message. I haven’t had luck finding a post that helps with that. Can anyone point me to anything that may help?

Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter whiteboxer

    (@whiteboxer)

    I hadn’t heard any responses to this, but I have an alternative method. I’m thinking the easiest solution is to create a new page called blog. The only problem is (I’m assuming this of course) that the page wouldn’t/couldn’t be moved into a subfolder named “blog”. That’s not really critical, but my original thinking was it would be easier to manage. Again, I’m new to the whole WordPress/bloggin/PHP thing, so any feedback if this is a good move or not, and any possible better alternatives, would be greatly appreciated.

    Why not just move the entire WP install to the sub directory?

    Moving_WordPress has details, but it’s a pretty simple process.

    Actually, I am trying to do something similar in that I want to use WP as a CMS and also have a blog section of the site. I am trying to create a blog page in which all of the blog-related content flows through that template and the rest of the site is driven by other page templates.

    My first challenge is simply the fact that WP is oriented to just use the base URL as it’s target for anything blog so I have to change that to the blog page.

    Does this sound like the same general direction you are trying to go in?

    -gl

    Thread Starter whiteboxer

    (@whiteboxer)

    Like georgeloch, I want WP as the CMS for the entire site, not just the blog. But I don’t want the blog to be the home page either. I’m not sure what’s the most effective way to pull this off.

    Thread Starter whiteboxer

    (@whiteboxer)

    I checked out the link HandySolo provided and found this other link there:

    Giving WordPress Its Own Directory. It looks like that will do the trick. Once I test it out, I’ll post a results. Thanks.

    Thread Starter whiteboxer

    (@whiteboxer)

    Any feedback on what the link to the blog index page should be? Right now I have it as blog/index.php but that’s not working. I don’t know if I have bad code somewhere or the link should be named differently.

    Thread Starter whiteboxer

    (@whiteboxer)

    I’m having problems getting things to display properly. I followed the steps from the link above with no good results. What I want to do is the reverse of what the link outlines, and wonder if that’s my problem. I want to move the blog but keep WordPress into the root directory (as opposed to moving WordPress and keeping the blog in the root). Here’s the error message I’m getting.

    Warning: main(./wp-blog-header.php): failed to open stream: No such file or directory in /home/html/blog/index.php on line 4

    Warning: main(./wp-blog-header.php): failed to open stream: No such file or directory in /home/html/blog/index.php on line 4

    Fatal error: main(): Failed opening required ‘./wp-blog-header.php’ (include_path=’.:/usr/local/lib/php’) in /home/html/blog/index.php on line 4

    My earlier reply:
    Why not just move the entire WP install to the sub directory?

    I’m still wondering that…

    Thread Starter whiteboxer

    (@whiteboxer)

    I want WordPress to handle the non-blog pages as well. I’m assuming (maybe falsely) that those pages would then move into the subdirectory, or I would have to create separate HTML pages. Is my thinking wrong on that?

    I did this last summer on one of my first WP sites. I had to think a bit about how I did it, but as I recall I think I ended up using the Static Front Page plugin.
    https://www.semiologic.com/software/static-front/

    Here’s the site, pretty simple.
    https://www.littleredschoolhousehayward.com

    I’m building a new site where I need to do the same thing and I see that WP2.1 apparently offers this:
    https://codex.www.ads-software.com/Creating_a_Static_Front_Page

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘moving blog index.php into subfolder’ is closed to new replies.