Page 1 of 1

running site on local host instead of the specific folder

PostPosted: 02. May 2023 06:43
by awaisbilal
Hi Dear XAMPP community,
I am new to the web servers world, I have a local WordPress website on my windows 10 pc. It loads in the browser when I type http://localhost/mysite in the address bar. Instead of the folder address I want to load my website at http://localhost in address bar of the browser, is there any solution for this purpose, please advise. Righton XAMPP keeps on showing its dashboard on the localhost address, can we show this dashboard on other address?

Re: running site on local host instead of the specific folde

PostPosted: 02. May 2023 08:51
by Altrea
Hi,

you could define a virtual host pointing DocumentRoot to your /htdocs/mysite/ folder.
Keep in mind that wordpress generates urls based on the base url, so you need to adjust this in the wordpress configs too or install wordpress freshly from the new url.

Re: running site on local host instead of the specific folde

PostPosted: 02. May 2023 11:30
by Nobbie
You can also simply change the value of DocumentRoot to your specific folder, as well as the Directory Block for the DocumentRoot. Do not install WordPress before you do this change, but after you restarted Apache. Keep in mind that this means also that the dashboard does not appear any longer.