最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

apache - Serving WordPress in it's own directory on localhost on WAMP

programmeradmin2浏览0评论

I have followed Giving WordPress it's own directory for directions on how to accomplish this on www.mysite (once it goes live) but I'm looking for localhost directions to serve my site to localhost directly with WordPress in a SubFolder (I don't think you change .htaccess for localhost).

My WordPress installation is at /sitefolder/arc/...

How can I browse to localhost and see my site as opposed to the way it is now, having to navigate to localhost/sitefolder/arc?

I am guessing its something in the DocumentRoot?

I am using WAMP.

Thanks!

I have followed Giving WordPress it's own directory for directions on how to accomplish this on www.mysite (once it goes live) but I'm looking for localhost directions to serve my site to localhost directly with WordPress in a SubFolder (I don't think you change .htaccess for localhost).

My WordPress installation is at /sitefolder/arc/...

How can I browse to localhost and see my site as opposed to the way it is now, having to navigate to localhost/sitefolder/arc?

I am guessing its something in the DocumentRoot?

I am using WAMP.

Thanks!

Share Improve this question edited Jun 15, 2019 at 0:54 West asked Jun 15, 2019 at 0:14 WestWest 211 silver badge6 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 1

You have two alternatives:

  1. Change the DocumentRoot directive in the WAMP httpd.conf file (use CTRL+F to find it). That way you will change the whole root folder of your server, be aware of that!

  2. Create a virtual host that will bind a domain to a particular subfolder in your document root (similar to subdomains logic). Here some article that might help:

https://www.techrepublic/blog/smb-technologist/create-virtual-hosts-in-a-wamp-server/

I personally prefer the second option, is better than modify the entire document root. With a virtual host you choose if you want to use the root or a subdirectory.

Be happy!

发布评论

评论列表(0)

  1. 暂无评论