Can’t Access existing localhost site

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

Can’t Access existing localhost site

Postby mateoco » 03. December 2020 12:58

[COPIED from the WORDPRESS.ORG forum, as they mentioned I should enquire here]:
https://wordpress.org/support/topic/cant-access-existing-localhost-site/#post-13736426

Hi friends,

So many things I need help with. Where to start?
Ok so first last week I installed Xampp + WordPress and managed to open a localhost website. THAT TOOK ME ABOUT 8 HOURS to figure out.
Yes, that kind of a NOOB.

Even so, I managed to download a theme and generally started to get the hang of it. But today, when I wanted to get back where I stopped, I couldn’t access the site.
1. Should there be an identifiable “wordpress icon” to click to get a quick access to the website?
2. I guess not, so I enter Xampp, press “start” on both “apache” and “SQL” and press Admin, but get an unable to connect message.
3. Tried to type “localhost:8080” and reached the “ApacheFriends” page but have no idea where to go next. Tried to type different “commands” but didn’t work.
4. Only when I type localhost:8080/GlobalIdeology (which is the temporary name of the wordpress site) I get to an index page with a “wordpress” folder. When I press that one, I get that same “unable to connect” page.

So I have opened a localhost website using Xampp + WordPress but now I dont know where the door is. Can you please help me?

Thank you,
M
mateoco
 
Posts: 7
Joined: 03. December 2020 12:56
XAMPP version: 8.0.0 / PHP 8.0.0
Operating System: Windows

Re: Can’t Access existing localhost site

Postby Altrea » 03. December 2020 16:39

Hi,

mateoco wrote:[COPIED from the WORDPRESS.ORG forum, as they mentioned I should enquire here]:
https://wordpress.org/support/topic/can ... t-13736426

Thanks for showing us the other related threat about your issue. This is always important and helps to see which steps of debugging the lther community has already taken.

mateoco wrote:1. Should there be an identifiable “wordpress icon” to click to get a quick access to the website?

No commonly not. It depends a little bit on the installation media you used for wordpress. But if you used wordpress from the wordpress website this will not create any short cut icons.

mateoco wrote:2. I guess not, so I enter Xampp, press “start” on both “apache” and “SQL” and press Admin, but get an unable to connect message.
3. Tried to type “localhost:8080” and reached the “ApacheFriends” page but have no idea where to go next. Tried to type different “commands” but didn’t work

These both are depending. You obviously changed the default http port for Apache. How exactly did you do that?
Maybe you forgot to tell the control panel the new port too? Please read my [Q&A] Changing the Apache default ports

The correct url you need to enter starts with http://localhost:8080/ followed by the folder name you choose for your wordpress installation in your htdocs folder.
For example if the wordpress files are saved in C:\xampp\htdocs\wordpress\ than the correct url for your changed default port Apache wordpress would be http://localhost:8080/wordpress/
.
mateoco wrote:4. Only when I type localhost:8080/GlobalIdeology (which is the temporary name of the wordpress site) I get to an index page with a “wordpress” folder. When I press that one, I get that same “unable to connect” page.

We maybe need to dig deeper here, but for that we need much more information. Let's start with the basic ones which accessible by the Logs Button from the Apache module in your control panel:
  • Apache access.log
  • Apache error.log

Are you able to access phpmyadmin by URL http://localhost:8080/phpmyadmin ?
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11942
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: Can’t Access existing localhost site

Postby Nobbie » 04. December 2020 13:23

Altrea wrote:Thanks for showing us the other related threat about your issue.


"thread" - not "threat". A "threat" is a "Bedrohung".
Nobbie
 
Posts: 13182
Joined: 09. March 2008 13:04

Re: Can’t Access existing localhost site

Postby mateoco » 04. December 2020 20:06

Hi, there Altrea, thank you so very much for this reply. You can imminently tell a person who is ready to help.

Altrea wrote:Thanks for showing us the other related threat about your issue. This is always important and helps to see which steps of debugging the lther community has already taken.


Indeed. But I haven't taken any steps yet, so your suggestions would be our guinea pig

Altrea wrote: You obviously changed the default http port for Apache. How exactly did you do that?


Yes I have. "Config>httpd.conf + httpd-ssl.conf> Change from 80 to 8080 & from 443 to 4430

Altrea wrote: Maybe you forgot to tell the control panel the new port too?


WORKED. God damn it man, seem so easy after you explain it.

Altrea wrote:Let's start with the basic ones which accessible by the Logs Button from the Apache module in your control panel:
  • Apache access.log
  • Apache error.log


Sure I see it. Lot's of details about my crappy computer and login dates. A complete INVASION OF MY PRIVACY. How do I attach those in a reply, LOL?

Altrea wrote:Are you able to access phpmyadmin by URL http://localhost:8080/phpmyadmin ?


YES. It redirects to the SQL Admin portal.
mateoco
 
Posts: 7
Joined: 03. December 2020 12:56
XAMPP version: 8.0.0 / PHP 8.0.0
Operating System: Windows

Re: Can’t Access existing localhost site

Postby Altrea » 04. December 2020 23:54

mateoco wrote:
Altrea wrote:Let's start with the basic ones which accessible by the Logs Button from the Apache module in your control panel:
  • Apache access.log
  • Apache error.log


Sure I see it. Lot's of details about my crappy computer and login dates. A complete INVASION OF MY PRIVACY. How do I attach those in a reply, LOL?

Maybe we can solve your problem without attaching those data if you are worried about sensitive personal data.

What we already know is, that XAMPP and it's components are working fine. You can access the XAMPP dashboard and phpmyadmin. So Apache and MariaDB are working and configured properly. Or did you get any unable to connect error messages in phpmyadmin too?
What we don't know yet is anything about your very own wordpress installation, where it is installed, how it is configured, how it was working in the past.

What i am searching for are any hints about:
  • previously working requests to your wordpress sites. Maybe you have done something like defining a virtualhost, and need to use a different local domain name to request your wordpress site?
  • Any hints about error messages related to your specific error

Maybe you have changed something like the password for the database user wordpress is using, or deleted the user entirely. Maybe the issue is related to your wordpress configuration.
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11942
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: Can’t Access existing localhost site

Postby mateoco » 05. December 2020 12:27

Altrea wrote: Or did you get any unable to connect error messages in phpmyadmin too?


I can reach phpmyadmin by pressing "Admin" in the "MySQL" row in the control panel. So I guess that fine.

when I type "http://localhost:8080/GlobalIdeology/wordpress/" I see that "INDEX OF /GLOBALIDEOLOGY" page with a "wordpress folder". When I press it I get to "unable to connect", which is also what i get when I type "http://localhost:8080/GlobalIdeology/wordpress/".

But if I understand you correctly, I should get to the "login to wordpress" page, right?

Altrea wrote:What we don't know yet is anything about your very own wordpress installation, where it is installed, how it is configured, how it was working in the past.


If I remember correctly, after watching a few "quick guides to wordpress" (XAMPP's as well) I unzipped the wordpress file directly to the xampp>htdocs>globalideology folder. After trying to use BITNAMI I eventually did it without (as I mentioned, it took me many hours to get to a working localhost site).

Altrea wrote:Maybe you have done something like defining a virtualhost, and need to use a different local domain name to request your wordpress site?


I only entered the localhost site ONCE, and that was directly after installation. I do not remember defining a virtualhost, but perhaps I did it inadvertably. How can I check it?

Altrea wrote:Any hints about error messages related to your specific error[/list]


Where can I find details about the specific error?

Altrea wrote:Maybe you have changed something like the password for the database user wordpress is using, or deleted the user entirely. Maybe the issue is related to your wordpress configuration.


Maybe. I'm willing to check everything. But unfortunately the guys at the wordpress.org forum didn't go through all those options but imminently went to suggest backing up the current progress and reinstalling the program, which seems pretty extreme...
mateoco
 
Posts: 7
Joined: 03. December 2020 12:56
XAMPP version: 8.0.0 / PHP 8.0.0
Operating System: Windows

Re: Can’t Access existing localhost site

Postby Altrea » 05. December 2020 14:18

mateoco wrote:I can reach phpmyadmin by pressing "Admin" in the "MySQL" row in the control panel. So I guess that fine.

By "can reach" you mean you also get automatically logged in, can see all the databases in the left panel?

mateoco wrote:when I type "http://localhost:8080/GlobalIdeology/wordpress/" I see that "INDEX OF /GLOBALIDEOLOGY" page with a "wordpress folder". When I press it I get to "unable to connect", which is also what i get when I type "http://localhost:8080/GlobalIdeology/wordpress/".

So, wordpress is extracted to \xampp\htdocs\GlobalIdeology\wordpress\ ?
How does the "unable to connect" error page look like? Maybe you can take a screenshot of it and upload it to any of the image file hosting services to show it to us?

mateoco wrote:But if I understand you correctly, I should get to the "login to wordpress" page, right?

Depends on the wordpress installation, it's extensions etc. Normally you get to the Wordpress Frontend which shows the current webpage configured in wordpress.
The login to the backed should be behind the url http://localhost:8080/GlobalIdeology/wo ... /wp-admin/

mateoco wrote:
Altrea wrote:Maybe you have done something like defining a virtualhost, and need to use a different local domain name to request your wordpress site?


I only entered the localhost site ONCE, and that was directly after installation. I do not remember defining a virtualhost, but perhaps I did it inadvertably. How can I check it?

You can open the file \xampp\apache\conf\extra\httpd-vhosts.conf . Are there any lines without a # in front?
If you said you could only enter your wordpress localhost url once, maybe the installation itself was not successful at any point.


mateoco wrote:
Altrea wrote:Maybe you have changed something like the password for the database user wordpress is using, or deleted the user entirely. Maybe the issue is related to your wordpress configuration.


Maybe. I'm willing to check everything.

Okay, let's see. Is there any file named .htaccess inside your folder \xampp\htdocs\GlobalIdeology\wordpress ? If yes, what is the contents of this file?
Can you search for a file wp-config.php in your wordpress folder? There should be some lines similar to this
Code: Select all
define('DB_NAME', 'database_name_here');
/** MySQL database username */
define('DB_USER', 'username_here');
/** MySQL database password */
define('DB_PASSWORD', 'password_here');
/** MySQL hostname */
define('DB_HOST', 'localhost');

These should define the database credentials used to login to the database.
You could check if the database name mentioned in the setting DB_NAME is existing in your phpmyadmin database list
You can check if the user defined in DB_USER is existing in the phpmyadmin User Accounts tab

There should also be some settings for the wordpress base url you can check
Code: Select all
define( 'WP_HOME', 'http://yoursiteurl.com' );
define( 'WP_SITEURL', ‘http://yoursiteurl.com' );


mateoco wrote:But unfortunately the guys at the wordpress.org forum didn't go through all those options but imminently went to suggest backing up the current progress and reinstalling the program, which seems pretty extreme...

Well, normally this is the best solution at your state of installation. The guys from wordpress are expecting that the wordpress installation process is quite easy and should only take some minutes. And of course this is the much easier way for the helpers too to get back to a defined state. Maybe this is not that frustrating if you get guidance by us. It's up to you
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11942
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: Can’t Access existing localhost site

Postby mateoco » 05. December 2020 17:00

Altrea wrote: By "can reach" you mean you also get automatically logged in, can see all the databases in the left panel?


Yes, I believe so. I attached a screenshot LINK:
https://ibb.co/q1Cyz1m

Altrea wrote: So, wordpress is extracted to \xampp\htdocs\GlobalIdeology\wordpress\ ?


Yes.

Altrea wrote: How does the "unable to connect" error page look like? Maybe you can take a screenshot of it and upload it to any of the image file hosting services to show it to us?


Good idea:
https://ibb.co/hVMxrp8

Altrea wrote:The login to the backed should be behind the url http://localhost:8080/GlobalIdeology/wo ... /wp-admin/


I see. Typing this leads to the same "unable to connect" but this time the url changes to -
http://localhost/globalideology/wordpre ... F&reauth=1

Altrea wrote:You can open the file \xampp\apache\conf\extra\httpd-vhosts.conf . Are there any lines without a # in front?


Not sure. Technically I would say yes. There are four lines that stars with # but when they reach the line finishes they go down to a line without #

I attached a screenshot: https://ibb.co/Ky7p8bJ

Altrea wrote:Is there any file named .htaccess inside your folder \xampp\htdocs\GlobalIdeology\wordpress ? If yes, what is the contents of this file?


Yes. I have opened the contents using Firefox:

# BEGIN WordPress
# The directives (lines) between "BEGIN WordPress" and "END WordPress" are
# dynamically generated, and should only be modified via WordPress filters.
# Any changes to the directives between these markers will be overwritten.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /globalideology/wordpress/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /globalideology/wordpress/index.php [L]
</IfModule>

# END WordPress

Altrea wrote:Can you search for a file wp-config.php in your wordpress folder?


Yes, but it's contents seem very different and messy:


Altrea wrote:The guys from wordpress are expecting that the wordpress installation process is quite easy and should only take some minutes. And of course this is the much easier way for the helpers too to get back to a defined state. Maybe this is not that frustrating if you get guidance by us. It's up to you
[/quote]

Yes ill appreciate help in backing up current site + reinstalling everything if you think it will be easier and quicker then searching for the source of the problem.
mateoco
 
Posts: 7
Joined: 03. December 2020 12:56
XAMPP version: 8.0.0 / PHP 8.0.0
Operating System: Windows

Re: Can’t Access existing localhost site

Postby Altrea » 05. December 2020 18:15

mateoco wrote:Yes, I believe so. I attached a screenshot LINK:
https://ibb.co/q1Cyz1m

Okay, so the Database is running and there are databases you created. Thats good.
"globalideology" or "global ideology" is your wordpress database i guess.

mateoco wrote:
Altrea wrote: How does the "unable to connect" error page look like? Maybe you can take a screenshot of it and upload it to any of the image file hosting services to show it to us?


Good idea:
https://ibb.co/hVMxrp8

Okay, this error message comes from your Browser and what you can see is, that the port is missing in the url.
So the main reason you have trouble is, that the new port Apache is uses is not properly defined in the wordpress cofiguration.

mateoco wrote:
Altrea wrote:Is there any file named .htaccess inside your folder \xampp\htdocs\GlobalIdeology\wordpress ? If yes, what is the contents of this file?


Yes. I have opened the contents using Firefox:

# BEGIN WordPress
# The directives (lines) between "BEGIN WordPress" and "END WordPress" are
# dynamically generated, and should only be modified via WordPress filters.
# Any changes to the directives between these markers will be overwritten.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /globalideology/wordpress/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /globalideology/wordpress/index.php [L]
</IfModule>

# END WordPress

Okay, this .htaccess file looks good enough to me. Especially the folders in the RewriteBase setting needs to match your subfolder structure (as long if you don't define a virtual host, which you don't seem to have).

mateoco wrote:
Altrea wrote:Can you search for a file wp-config.php in your wordpress folder?


Yes, but it's contents seem very different and messy:

Doesn't matter any more at this point. I expect that the database connection is working correct.
But we need to adjust the settungs for "home" and "site_url" in your wordpress database.
Please expand the wordpress database and search for a table named wp-options and click on it..
Inside this database please click on the Browse tab and search for a the two lines which have in the column 'option_name' the value 'siteurl' and 'home'.
These two need to be changed, you need to add the new http port 8080 after the domain.
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11942
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: Can’t Access existing localhost site

Postby mateoco » 05. December 2020 19:09

Altrea wrote: Okay, this error message comes from your Browser and what you can see is, that the port is missing in the url.
So the main reason you have trouble is, that the new port Apache is uses is not properly defined in the wordpress cofiguration.


If you mean that the address is simply "localhost" and not "localhost:8080" than yes, I also noticed that. It changes automatically.

Altrea wrote:Please expand the wordpress database and search for a table named wp-options and click on it..
Inside this database please click on the Browse tab and search for a the two lines which have in the column 'option_name' the value 'siteurl' and 'home'. These two need to be changed, you need to add the new http port 8080 after the domain.


It WORKED. I gained access to the site. It was all because of the ports. Thanks a lot man!
mateoco
 
Posts: 7
Joined: 03. December 2020 12:56
XAMPP version: 8.0.0 / PHP 8.0.0
Operating System: Windows

Re: Can’t Access existing localhost site

Postby Altrea » 05. December 2020 19:12

Glad we have sorted this out :D
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11942
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: Can’t Access existing localhost site

Postby mateoco » 06. December 2020 18:25

Just a few quick followups, if possible:

1. Evidently I now need to change the port name in config>service and port settings each time I start XAMPP. On top of that when I make the change an error message appears.

I attach a link to the error message
https://ibb.co/wWc4VmB

2. Even thoguh the change in {wp_options>siteurl} did allow me to reach the site, when I press "Home" on the site it still redirects to the old url (without the :8080 port). Nonetheless the option value of wp_options_home shows the new port. How can that be?
I attach a screenshot to current the wp_options values.
https://ibb.co/17G9m6M

3. The port change did allow me to regain access and see the website again. But how do I go about getting back to editing it? I know this is more a question to the guys at the wordpress forum, but so far it seems you guys are quicker.
mateoco
 
Posts: 7
Joined: 03. December 2020 12:56
XAMPP version: 8.0.0 / PHP 8.0.0
Operating System: Windows

Re: Can’t Access existing localhost site

Postby Altrea » 06. December 2020 19:52

mateoco wrote:1. Evidently I now need to change the port name in config>service and port settings each time I start XAMPP. On top of that when I make the change an error message appears.

I attach a link to the error message
https://ibb.co/wWc4VmB

Yeah, the control panel configuration file is not writable for normal windows users because of an open vulnerability.
You can start the control panel as Administrator, adjust the settings and close again to save them for your normal user too.


mateoco wrote:2. Even thoguh the change in {wp_options>siteurl} did allow me to reach the site, when I press "Home" on the site it still redirects to the old url (without the :8080 port). Nonetheless the option value of wp_options_home shows the new port. How can that be?
I attach a screenshot to current the wp_options values.
https://ibb.co/17G9m6M

I am no wordpress expert so i cannot say anything to this issue, sorry.

mateoco wrote:3. The port change did allow me to regain access and see the website again. But how do I go about getting back to editing it?

I would guess that you can access the Wordpress Backend by url http://localhost:8080/GlobalIdeology/wo ... /wp-admin/

mateoco wrote:I know this is more a question to the guys at the wordpress forum, but so far it seems you guys are quicker.

It is not a matter of quickness. We can only provide support for xampp components here. Every helper is free to help on other topics here too, but the Board rules are telling you exactly what we want to support here and what not.
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11942
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: Can’t Access existing localhost site

Postby mateoco » 07. December 2020 14:05

Altrea wrote: You can start the control panel as Administrator, adjust the settings and close again to save them for your normal user too.


WORKED.

Altrea wrote:
mateoco wrote:2. Even thoguh the change in {wp_options>siteurl} did allow me to reach the site, when I press "Home" on the site it still redirects to the old url (without the :8080 port). Nonetheless the option value of wp_options_home shows the new port. How can that be?
I attach a screenshot to current the wp_options values.
https://ibb.co/17G9m6M

I am no wordpress expert so i cannot say anything to this issue, sorry.


I actually thought it's a XAMPP issue. The port change of siteurl did allow access but the port change of Home seem to do nothing.

mateoco wrote:I would guess that you can access the Wordpress Backend by url http://localhost:8080/GlobalIdeology/wordpress/wp-admin/


WORKED.

you see that's the thing. You just threw something from the top of your head and solved my problem in seconds. Meanwhile, in the designated localhost wordpress.org forum, a guy suggest I should run commends as administrator in Notepad and click-bated me into entering his stupid golf website.
https://wordpress.org/support/topic/cant-access-existing-localhost-site/#post-13754410

So it's just another way of saying a BIG THANKS. If it wasn't for you, I would have had to backup my site, reinstall everything, go into notepad as admin, change c:\Windows\System32\Drivers\etc\hosts, get frustrated and buy a f***** golf club.
mateoco
 
Posts: 7
Joined: 03. December 2020 12:56
XAMPP version: 8.0.0 / PHP 8.0.0
Operating System: Windows

Re: Can’t Access existing localhost site

Postby Altrea » 07. December 2020 16:19

mateoco wrote:2. Even thoguh the change in {wp_options>siteurl} did allow me to reach the site, when I press "Home" on the site it still redirects to the old url (without the :8080 port). Nonetheless the option value of wp_options_home shows the new port. How can that be?
I attach a screenshot to current the wp_options values.
https://ibb.co/17G9m6M

You can double check in your WordPress admin backend at Dashboard > Settings > General

If this doesn't help it also might be a browser cache issue. You should try to empty your browser cache or try a different browser for test purposes
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11942
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 152 guests