WordPress.org

Ready to get started?Download WordPress

Forums

Install WP in the root directory or subdirectory? (3 posts)

  1. jackiekaiwei
    Member
    Posted 1 year ago #

    I know we can use either root directory or subdirectory, but I am just wondering which one is more suitable for my website. 

    Basically my website also contains some webpages other than WP blog posts.  The thing is that I want to take the advantage of the WP users, and all these webpages can use WP cookies to recognize the WP users.

    There are two designs. 

    1. Install WP into root directory and the URL will be something like: http://example.com/

    - Customize the home page(get rid of the posts and it will looks like a normal website home page).
    - Create some non-blog pages (e.g. http://example.com/product) which are able to read the WP users cookies.

    2. Install WP into subdirectory and the URL will be something like: http://example.com/blog

    In this case, my other web pages including home page do NOT under the WP Installation directory (http://example.com/blog). Can these pages use WP cookies, users, and database tables?

    The other question is that should I create the non-blog webpages within WP or separately?

    I really appreciate any advice!

  2. esmi
    Forum Moderator
    Posted 1 year ago #

    Can these pages use WP cookies, users, and database tables?

    Nope. I'd probably go for scenario (1) but see creating a static front page.

  3. jackiekaiwei
    Member
    Posted 1 year ago #

    Hi Esmi, thank you so much for your prompt response!

Topic Closed

This topic has been closed to new replies.

About this Topic