Let me state right up front that I’m not an IT professional.
I admin our company’s in-house server, a MacMini running SL server (10.6.8), serving 3 virtual hosts for web, mail, and ftp. No problems. I created the sites we run using GoLive and now Dreamweaver; they are fairly simple and never required WP.
We are now working with a web design company to revamp our main site and incorporate some more advanced functionality. They asked me to install WP, which I was able to do successfully within the root directory of our main site. So on our server there is a secondary hard drive containing a “websites” folder, and within that folder, separate folders for each of the domains we’re hosting. The path to our main domain looks something like this:
I dropped all the WP files loose into the domain1 folder, followed all the setup instructions, and was able to complete the WP install by accessing this URL:
All good so far–but here’s the part I can’t figure out. The web design company asked me to create a subdirectory within our domain1 folder that they could use for testing pages as they develop the new site. So I created a subdirectory called “testing”:
Now they are saying that they need WP installed and running *within* that folder, rather than in the root folder of the domain. I can’t figure out how to make that happen.
Here’s what I tried. I moved all WP files into the “testing” subdirectory. I then went into phpMyAdmin, deleted the user and database I had made for WP, and recreated it. This allowed me to run a fresh WP install. But this time I would have thought the “testing” subdirectory would have to be included in the install URL, like this:
But that URL doesn’t work, and I don’t know why. I wonder if it’s because in the edited wp-config file I created I’m specifying DB_HOST as ‘localhost’, and this is preventing WP install from looking to the “testing” subdirectory? Or do I need to specify something in ABSPATH, since I’m no longer at the domain root?
Here’s what’s even weirder. I discovered that if I use the original install path:
http://www.domain1:8888 (I don’t even have to include the “/wp-admin/install.php” part)
I’m taken to the WP admin setup, which I can run successfully. Now, I’m not clear on how that’s possible, since the WP files are in the “testing” subdirectory. And maybe I’ve actually already accomplished what I was attempting. But I think not, because when I log in to WP admin and look at Settings > General, it’s showing my WP Address as
Whereas if I had accomplished my goal I should think it would read:
If anyone can shed any light on this, I’d truly appreciate it. Just please bear in mind that I am not an IT professional, so things that may seem obvious to someone who fully understands this stuff may not be obvious to me.
Thanks in advance!
- The topic ‘Running WP from a domain subdirectory’ is closed to new replies.