WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] WordPress as CMS, blog in sub-folder (9 posts)

  1. Eric Martin
    Member
    Posted 6 years ago #

    So, I've read a bunch of different posts/tips, but still seem unable to grasp what I need to do. I want to have WordPress power my site, have a static front page and have all of my posts at mydomain.com/blog.

    What I've done so far...
    1) I followed the tips on moving the WordPress files to a different location. I put everything under mydomain.com/wp and updated the options accordingly.
    2) I've added a home.php page in my theme directory for my static home page. I know there is the built-in option to use an existing page, but I think I prefer the home.php way ...
    3) Created a blog directory and copied the index.php and updated the require statement...but I just get a 404 error.

    So, either 1) it's not possible, 2) there is a simple fix, or 3) i'm just dense =)

    I appreciate any help/suggestions.

  2. Metlin
    Member
    Posted 6 years ago #

    Is the static page that you are trying to create a part of WP or not?

    If it is indeed a part of WP, you can just go to Options -> Reading and choose one of the static pages as your front page. As long as you have the index.php in the root (/) directory, everything is fine. Just ensure that you edit it to reflect your WP path.

    If it is not a part of WP, that is fine too. As long as the index.php exists in the /wp directory (and its reference has been changed accordingly), you can do http://www.mydomain.com/wp and get to it.

    Does this help?

  3. Eric Martin
    Member
    Posted 6 years ago #

    Thanks for the reply. I think I understand what you are saying, but am not sure if it solves my quest...

    Here is what I would like:
    - WP as a "CMS"
    - WP under mydomain.com/wp < done
    - mydomain.com/ < a static page rendered by WP
    - mydomain.com/blog < WP posts
    - mydomain.com/xyz < WP pages (about, contact, etc)

  4. Eric Martin
    Member
    Posted 6 years ago #

    I just started working with WP and am just curious if the above is easily possible...or if I need to find a different structure/method.

  5. Metlin
    Member
    Posted 6 years ago #

    By CMS, do you mean Content Management System?

    And from what I understand, all that you ask for is definitely possible using WP.

    Here's what I'd suggest -

    - Install WP in the /blog directory
    - Copy the index.php to the / directory
    - Go to WP and create static-page (by doing to Write -> Pages)
    - Go to Options -> Reading and set the front page to be static-page.php from the pages list
    - To get to your home page, use /
    - To get to your blog, use /blog
    - Create additional pages as you wish in your templates.

    Alternatively, if you have installed WP in the /wp directory, that is fine too. You can simply create a redirect HTML page in the /blog directory and point it to the /wp directory.

    While this would functionally work, I'd recommend installing it straight because search engines and spiders do not like redirects all that much.

    Does this help?

  6. LostInNetwork
    Member
    Posted 6 years ago #

    1) Make sure that WordPress is installed as usual. The blog messages are shown on the default "front" page. In your case it would be URL/wp/

    2) Create a static web page using "Write page". That will become your new front page.

    3) Edit Options->Reading->Frontpage displays: A static page
    Assign a static front page (choose the one you want; see #2)
    Assign a blog page (call it "blog")

    4) Make sure, that after this change the default page is URL/wp and the blog is URL/wp/blog

    5) IF everything worked out, move WordPress back to where it was, to remove the extra /wp/...

  7. Eric Martin
    Member
    Posted 6 years ago #

    That does help...thank you very much for the suggestions!

  8. Eric Martin
    Member
    Posted 6 years ago #

    So, here's what I've done:

    - Installed WP in /blog
    - Copied index.php into /
    - Updated URL options to /blog
    - Created a page, called Home
    - Set Home as the front page

    So now when I go to /, I see the Home static page. But I also see it when I go to /blog.

    So,
    1) What do I need to do to make /blog display the most recent posts?

    EDIT - I got this one figured out. I just created a blog page (as suggested previously ;) ) and then changed my blog URL to /.

    2) What is the best way to give each page a custom look and feel? Do I just assign them different templates?

    Thanks for the help ;)

  9. Eric Martin
    Member
    Posted 6 years ago #

    Pretty cool...the reading options has allowed me to setup my root as one page and my blog as another. I was trying to make it a lot harder than it really is ;)

    Now I just need to work on the templates/design!

    Thanks again for the help.

Topic Closed

This topic has been closed to new replies.

About this Topic