开发者

Any way of mapping the wordpress installation to the website root?

开发者 https://www.devze.com 2023-02-25 01:21 出处:网络
I installed Wordpress on a cPanel account, and it\'s accessible by visiting website.com/wordpress. What would I need to do to make it so that when a user visits website.com , he actually sees the we开

I installed Wordpress on a cPanel account, and it's accessible by visiting website.com/wordpress. What would I need to do to make it so that when a user visits website.com , he actually sees the we开发者_如何学Cbsite.com/wordpress ? I think there is a better solution than adding a redirect inside an index.html.


You can use .htaccess to make the wordpress location as your Directory index using a .htaccess file in your root above wordpress folder..

and include following in that .htaccess file

DirectoryIndex wordpress/index


Though I do not know about the cPanel admin section - look into your domain configuration or general settings: There should be a place where you can set the the target of the domain or your 'home directory'. it currently should point to the root directory '/'.

Simply let it point to the '/wordpress' folder and you should be fine. If you do not have access to the domain config, install the wordpress directly into the root directory.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号