• I’ve got a site, call it mydomain.com. I’ve put WordPress in mydomain.com/dir_for_wp (it’s a slightly better name than that).

    The reason is that I’m using another directoy, mydomain.com/non_wp_stuff, for images, CSS files, JS and other stuff. So I can rebuild the dir_for_wp directory without losing that other stuff.

    So:
    mydomain.com
    …dir_for_wp
    …….All the WP stuff
    …non_wp_stuff
    ……Images, CSS, JS, etc.

    As a result my pages show up in browser addresses as mydomain.com/dir_for_wp/A_WP_Page.php, with the extra “dir_for_wp” thrown in there.

    I’ve looking for some “best practice” advice:

    1) Is this something that is likely to bother visitors, seeing that extra “dir_for_wp”?
    2) Can I use .htaccess (or something) to make the page urls look like “mydomain.com/A_WP_Page.php”?
    3) Have I made this too complicated, i.e. would it make more sense to just put my WP stuff directly under mydomain.com, and still have the “non_wp_stuff” under there too, and avoid blowing up the “non_wp_stuff” (by backing it up, for example?) That is:

    mydomain.com
    …All the WP stuff
    …non_wp_stuff
    ……Images, CSS, JS, etc.

    I’ve got to back up the child theme that’s nestled within “All the WP Stuff” anyway.

    Any suggestions on this would be appreciated.
    Thanks!

    • This topic was modified 8 years, 2 months ago by virtualink.
Viewing 6 replies - 1 through 6 (of 6 total)
  • It won’t hurt anything on your site, so don’t be concerned about that. Will it “bother” any visitors? I highly doubt it. 99% of people don’t look at the URL address bar anyway, and a lot of modern browsers actively hide or otherwise mask anything that’s not the main domain name anyway.

    The only thing that you’d ever need to worry about is how you feel about it. If you are happy with it in a sub-domain, then leave it and be happy. If something bothers you about that, move it to the root folder and be happy. It’s really only a personal preference when it comes down to it.

    Thread Starter virtualink

    (@virtualink)

    Helpful answer, thanks!

    Hi virtualink,

    I think, it is better to move your WordPress in to root folder same like your 3rd approach.

    There is some SEO impact on the words in URL. So why we need some unnecessary word in our URL? Else I suggest you to use .htaccess to remove the folder name from your URL.

    hi. i have a funny problem! how can i add my own topic in this foroum??

    It’s more of a personal preference, really. I prefer a subdomain over subfolders. I would place the main content at the main domain level. For instance, if your WP blog is the main content, have that at the main domain level. If it is more of a side note to your other content, then put that content at the main domain and your WP stuff at a subdomain.

    Thread Starter virtualink

    (@virtualink)

    FYI, I moved the WP install to root, in prep for migration to a managed hosting service, likely Flywheel.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Using sub-directory url for wordpress, is this good idea’ is closed to new replies.