In which directory should WordPress be installed?
-
What are the consequences of installing WordPress so that the URL is (website name) versus (website name) /wp?
-
Install it in the In the Root Directory.
Hi Tara. Yes, I read this. But this doesn’t say, as you imply, that installation in the root directory is the answer. Step 4 says that one needs to decide between the root directory and a sub-directory. So I’m afraid my question remains: what are the consequences of one location over the other?
There is no problem of using any of this. You can install at root or at subdirectory. So, it’s really just personal preference.
If you install at root, your url will be http://yoursite.com/ but if you install in a subdirectory, the url will be http://yoursite.com/folder/. Many people use wordpress in root. Some people create one site in root and the blog site in a subdirectory. So, it’s really just personal preference.
Just one point, it’s my understanding that if you use a multisite and install wordpress in a subdirectory, you can’t have a sub-domain based multisite, for sub-domain based multisite you must install the wordpress in domain root.
possibly related threads: https://wordpress.org/search/installation+In+the+Root+Directory+vs+In+a+Subdirectory?forums=1
Thanks Tara. Since you seem to know what you are talking about, can I ask you to also answer my earlier post, ‘How to get a blog to come up when a site is accessed?’
After reading through your other post, I’ll add my 2 cents (CDN 😉
From what I gather, you have three sites:
1.
businessbythebook.com.au2.
businessbythebook.com.au/wp3.
tedsherwood.comSite 1 is the primary domain of your hosting account and the site files are in the root of the hosting account, generally public_html.
Site 2 is in a folder named
wpin the primary hosting account and is accessed by adding/wpafter the primary domain name.Site 3 should be in another folder in the root of the hosting account and named, for example,
tedsherwood.To get Site 3 to show up using
tedsherwood.com, you will have to add that domain to your hosting account (using Addon Domain if using cPanel as your hosting control panel) and point that domain to thetedsherwoodfolder.The latter is the way I always set up my hosting accounts: primary domain in the root location and any additional top level domains (e.g. your
tedsherwood.com) in their own folder and with the Addon Domain process.To add to the comments by Tara, one of the primary reasons for the primary domain to be in a sub folder is to keep the root of the account ‘tidy’ and ‘uncluttered’. There is no ‘real’ downside to doing it as outlined above.
Thanks Lyle.
No, two websites, quite separate but with the one hosting company (Nerdster).
The URL for WordPress on the first site – seen via ‘Softaculour – Edit Detail in cPanel – says businessbythebook.com.au/wp.
When I make the URL for WordPress on the second site tedsherwood.com/wp, I don’t get the same result when I access the website.
On the first site it goes to my blog, on the second it goes to a page that is not part of the blog, but has only three lines, beginning with ‘Index…’.
I am happy with the way the first site is working, so wanted to duplicate that with the second site. But it didn’t work. (It works now because WordPress is installed in tedsherwood.com. It is also still installed at tedsherwood.com/wp.
If you install at root, your url will be http://yoursite.com/ but if you install in a subdirectory, the url will be http://yoursite.com/folder/.
Not necessarily. All of my sites are in sub-folders, and none of them have that. Add-On Domains can be cPanel-assigned to go directly to their respective sub-folders, and .htaccess can be used to make a Primary domain skip to a sub-folder with all domains still using only domain.com to arrive.
OK, now I’m confused 🙂 … doesn’t take much … LOL!
Ultimately, when all is said and done, how many sites do you want and what are their top level domains (TLDs)?
You keep adding the /wp after a TLD … is this what you want? Is there another site at the TLD and the /wp is just a blog using WP?
Not sure what a TLD is, but I will try and explain what I’ve got and what I want.
I’ve got one website, businessbythebook.com.au which is built using a WordPress theme. The URL for the WordPress installation is, according to the software that installed it, Softaculous, businessbythebook.com.au/wp. When somebody types in http://www.businessbythebook.com.au they are taken to my blog page in that site.
I’ve got another website, tedsherwood.com, which is using, so far, the default WordPress theme. I have two installations of WordPress for this site. The first one was a duplication of the one that worked for the first website: URL, tedsherwood.com/wp. But when somebody typed in the website address, http://www.tedsherwood.com, up came ‘Index…’, ie. not the WordPress page. Problem.
So my host installed WordPress again, this time with a URL of tedsherwood.com. That is, without the /wp. Then it worked for the public, ie. when they typed in tedsherwood.com, up came the default WordPress template.
My original question for the forum was: why didn’t tedsherwood.com/wp at installation produce the same result as businessbythebook.com.au/wp at installation?
My original question for the forum was: why didn’t tedsherwood.com/wp at installation produce the same result as businessbythebook.com.au/wp at installation?
A specific, precise, detailed answer there would be dependent upon knowing all the exact details related to how your particular host has its servers set to handle the assignment and pointing of Domain Names, and Lyle has covered the related commons and typicals. Also, Softaculous incorrectly showing businessbythebook.com.au/wp as your one site’s URL is a result of its giving a logical, limited-view report (just as WordPress typically does) without considering the above.
In which directory should WordPress be installed? Wherever you want it, and then either assign the domain to that actual location or else use .htaccess or whatever else to get it there if a host does not make that possible at cPanel.
The topic ‘In which directory should WordPress be installed?’ is closed to new replies.