website - install in root or subfolder?

6 replies
Hi all,

I'm a newbie on this site and this is my first post. If this is posted in the wrong section, please go easy on me! So I created 2 websites over the past week using WP as a CMS. (My IM business I'm taking live and my father's merchant website.)

For each site I installed WP in a subfolder of the root....for example --> my site dot com/site/ <-- and I literally called each subfolder 'site'.

My reasoning for this is probably outdated...but when I designed sites in college (7 years ago) I had liked having each site packed neatly in it's own folder with all its content. It kept file maintenance easier for me.

Well now I'm starting to realize that that might not have been a bright move with the 301 redirect. Is it OK to redirect to the /site/ folder, is there a penalty for that? Does it slow down the bots? Google analytics indicated that it may.


If that was a poor decision, what's the easiest and most pain free way of bringing all my files up to the main root without breaking links?


Thanks for any insight you can give!
#install #root #subfolder #website
  • Profile picture of the author mahedi
    i am a new user in this forum.i am trying to learn php language.i want some guide line form any member for my betterment.
    {{ DiscussionBoard.errors[5202446].message }}
    • Profile picture of the author RobKonrad
      Originally Posted by mahedi View Post

      i am a new user in this forum.i am trying to learn php language.i want some guide line form any member for my betterment.
      Well, at first I'd suggest you start your own threads instead of posting to a random post and hijack it.
      2nd, use the search function. there are a million posts about it.


      Answer to OP's question:
      I'd suggest you move to root, if possible (of course you can't do that if you're running two sites from a single domain).

      Moving WordPress « WordPress Codex

      There's how to do it.

      Cheers
      Rob Konrad
      Signature
      ================================================== ===
      This blog is awesome: http://www.robkonrad.com/blog. Read it.
      ================================================== ===
      {{ DiscussionBoard.errors[5205581].message }}
  • Profile picture of the author GilGarcia
    Google analytics is right.

    It _may_ slowdown bots & users.

    My question is. Do you need the folder?

    If you don't (which is most likely the case) Why do you have it ?
    Signature
    {{ DiscussionBoard.errors[5202773].message }}
    • Profile picture of the author rajprince
      Effects badly on SEO.
      {{ DiscussionBoard.errors[5203540].message }}
  • Profile picture of the author webtechprodigy
    Are you using the same domain to host 2 websites?

    As in domain/site1 for your IM business and domain/site2 for your dad's site or are you talking about separate domains?

    Either ways, its best to move the site to the root domain. Don't use a 310 redirect. Just login ot your FTP program and move the entire directory from /site to the root domain and change the address in the database accordingly.
    {{ DiscussionBoard.errors[5208348].message }}
  • Profile picture of the author rossi303
    Each site has its own separate host. Like I said, I did it mainly from repetition. I did find a good workaround though. Can't post link since I'm a newbie, but the reference is from Ask WordPress Girl (askwp dot com).

    In the end, I'm glad I installed it in a subfolder for the following reasons - keeps root directory clean in case I want to run other sites on same host and adds layer of security by keeping WP files out of obvious location.

    Here's how I got it working.

    Step 1 - Take down 301 redirect (I did this last on both sites and I beat my head against the wall forever trying to figure out what I had missed - so obvious too.)

    Step 2 - Settings -> General tab, set your WordPress address URL to the subdirectory you installed WordPress in. Keep Site address as home address.

    Step 3 - Move index file to home directory.

    Step 4 - Edit said index file: <?php require('./wp-blog-header.php'); ?> to <?php require('./mywp/wp-blog-header.php'); ?>

    Step 5 - update permalinks (Settings -> Permalinks and click Save Changes).

    Step 6 - add a blank index page to subfolder


    It took less than 5 minutes for the workaround (minus the 'duh' moment with the 301 redirect).


    Thanks for your responses everyone! Hopefully this will be useful to someone else.
    {{ DiscussionBoard.errors[5208531].message }}

Trending Topics