Not Pointing to Wordpress Folder / Website

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Not Pointing to Wordpress Folder / Website

Postby Neuner » 14. May 2023 18:33

Got website registered with Registrar and they are mask forwarding to my Local IP Address. My router has been setup to Port Forward to the hosting PC.

I have my Wordpress blog setup and running with XAMP v3.3.0, Apache + SQL.

The problem is that when you visit the website, it still shows the XAMP welcome page, dashboard. How do I steer it to my Wordpress folder, localhost/realheroes instead of localhost/dashboard?

I only have and will only have the one website running locally. I've tried setting it up Virtually as instructed but it only messes it up and I wind up having to re-install everything again.

Thanks!
Neuner
 
Posts: 16
Joined: 14. May 2023 16:43
XAMPP version: v3.3.0
Operating System: Windows 10

Re: Not Pointing to Wordpress Folder / Website

Postby Nobbie » 15. May 2023 11:36

You should create a VirtualHost for your registered domain and define c:/xampp/htdocs/realheroes as DocumentRoot. After then install Wordpress already using the registered domain name. Do not install WordPress via localhost/realheroes, delete it if already installed. Otherwise it wont run via registered domain name.

P.S.:
Neuner wrote:I only have and will only have the one website running locally. I've tried setting it up Virtually as instructed but it only messes it up and I wind up having to re-install everything again.


"Only one"? Sure? Most people forget about "localhost"?! Wont you run local administration via localhost? Therefore, you need at least two VirtualHosts (localhost plus your new domain). And its the way to go. If you "messed" it up, you did something wrong, but you should correct it instead of not using it.

If you dont want to use VirtualHosts, you have to edit index.php from c:/xampp/htdocs, which does the redirect to the dashboard. Modify the code that it redirects to realheroes in case of your domain name instead of localhost. BUT: your WordPress will show up under http://mydomain/realheroes (where mydomain is the new domainname), it will NOT run unter http://mydomain plainly. (i.e. you can start it via http://mydomain, but it will redirect and change the URL to http://mydomain/realheroes). Its on you what you want. If you want to display and run WordPress via http://mydomain (not showing the foldername realheroes), you MUST modify the DocumentRoot and as you need a different DocumentRoot for localhost, you have to go via VirtualHosts. Its on you.

Anyway, you have to re-install everything after changing the Apache configuration. You CANNOT install WordPress into localhost, change the configuration (whichever way you go) and then run WordPress via the newly implemented domain name. That does not work. WordPress will do a redirect to http://localhost/realheroes, which will fail for remote clients.
Last edited by Nobbie on 15. May 2023 12:50, edited 1 time in total.
Nobbie
 
Posts: 13214
Joined: 09. March 2008 13:04

Re: Not Pointing to Wordpress Folder / Website

Postby Neuner » 15. May 2023 12:50

Nobbie wrote:If you "messed" it up, you did something wrong, but you should correct it instead of not using it.


Hence, the reason I posted my question...


If you dont want to use VirtualHosts, you have to edit index.php from c:/xampp/htdocs, which does the redirect to the dashboard. Modify the code that it redirects to realheroes in case of your domain name instead of localhost. BUT: your WordPress will show up under http://mydomain/realheroes (where mydomain is the new domainname), it will NOT run unter http://mydomain plainly. Its on you what you want. If you want to display and run WordPress via http://mydomain (not showing the foldername realheroes), you MUST modify the DocumentRoot and as you need a different DocumentRoot for localhost, you have to go via VirtualHosts. Its on you.


I don't mind VirtualHosts but I obviously don't know what I'm doing and need help. I followed directions but none of them said I have to install Wordpress afterwards. Can I leave the php database or does that need to be deleted as well?
Neuner
 
Posts: 16
Joined: 14. May 2023 16:43
XAMPP version: v3.3.0
Operating System: Windows 10

Re: Not Pointing to Wordpress Folder / Website

Postby Nobbie » 15. May 2023 12:51

Neuner wrote:Can I leave the php database or does that need to be deleted as well?


I dont know, but as WordPress installer creates a new database automatically, why keeping it?
Nobbie
 
Posts: 13214
Joined: 09. March 2008 13:04

Re: Not Pointing to Wordpress Folder / Website

Postby Nobbie » 15. May 2023 12:58

If you need help, you should explain what you already tried (show us your configuration code), tell us what happens and show us all error messages etc.pp. Without knowing anything we cannot help you.
Nobbie
 
Posts: 13214
Joined: 09. March 2008 13:04


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 143 guests