views:

78

answers:

2

I would like to put my local OS X wordpress site in my ~users/Sites/public directory, instead of the ~users/Sites so i can properly setup a capistrano deployment.

When i try this i can visit the site locally by visiting http://localhost/public and everything looks and works great but if i ever try to go to http://localhost/public/wp-admin to administer my local copy of wordpress it tries to redirect me back to http://localhost/wp-admin which doesn't exist.

Do you know how I might be able to work around this problem?

A: 

Changing your DocumentRoot in your Apache config would probably be a good place to start.

Azeem.Butt
I modified **/etc/apache2/httpd.conf** to contain DocumentRoot "/Users/<user>/Sites/public" and then restarted the server **sudo apachectl restart** any other configurations you can think of?
ThinkBohemian
+1  A: 

Make a symlink. In the terminal:

cd /Library/WebServer/Documents/
sudo ln -s ~/Sites/public/wp-admin

Then type your user password when prompted.

Josh
I still keep getting redirected when i try to go to localhost/public/wp-admin
ThinkBohemian
But now when you get redirected, you should see the admin...
Josh
It didn't, I ended up having to re-install wordpress which fixed the issue. I appreciate you following up.
ThinkBohemian
Sure. If you have a solution which was better than mine, you should post it as an answer to your question and accept it... of course I don't mind the +15 rep, but if others have the same issue, accepting your own answer will show them what actually worked. You also get a badge if enough people upvote your answer (2 I think)
Josh
If someone reads the comments for this, they will get the solution. Plus i appreciate you answering, also for replying. If my solution was more substantial I may have posted an **answer**.
ThinkBohemian