changed file folder name - cannot access web now

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

changed file folder name - cannot access web now

Postby jorr333@gmail.com » 16. September 2023 23:47

This is embarrassing but, I am a new "local host" developer and did something dumb. I'm developing a web on my PC using Xampp and need to start a second website. Stupidly, I changed the existing local site folder name from "wordpress" in Explorer which broke the connection so the site wouldn't open - I half expected that, but didnt expect that when I changed the folder back to the original name, I still get the error "This site can’t be reached localhost refused to connect." Even after closing and restarting Xampp and the URL tab.

Are there simple instructions I can follow to restore this? Thanks in advance!
jorr333@gmail.com
 
Posts: 8
Joined: 16. September 2023 23:26
XAMPP version: 3.3.0
Operating System: Windows 10

Re: changed file folder name - cannot access web now

Postby Nobbie » 17. September 2023 12:53

Try to clean the browser cache, i think that is only a caching problem (press Cntrl.+F5 in your browser when accessing http://localhost/wordpress).

P.S.: Is it really "refused to connect" in the error message? That usually does NOT mean a wrong folder name, but a wrong Apache configuration. Didnt you change anything else (Port for example)? It also can mean a problem with the Windows Firewall. Wrong foldername or missing folder usually would result in an "Error 404 Not found" or similar.

P.P.S.: You wrote "local host" above - did you enter that into your browser? It should be "localhost" (without space).
Nobbie
 
Posts: 13176
Joined: 09. March 2008 13:04

Re: changed file folder name - cannot access web now

Postby jorr333@gmail.com » 17. September 2023 14:51

Thank you for replying so quickly, Nobbie!
1. With Xampp open and clicking on the localhost frequently opened sites in my Chrome homepage shortcut, I still get the error after Cntrl +F5
2. Yes, it's a refuse to connect notification:
"This site can’t be reached
localhost refused to connect."
Nothing else was changed. I was in Explorer intending to have a descriptive folder name rather than the "WordPress" that was automatically created when downloading WordPress before creating the second local site. I didn't get a 404 error, only the refused to connect.
3. Thank you for the spelling correction - It should indeed be localhost. No, it was a spell-check correction here. This is the URL address from the frequently used shortcut:
http://localhost/wordpress/wp-admin/admin.php?page=avada
jorr333@gmail.com
 
Posts: 8
Joined: 16. September 2023 23:26
XAMPP version: 3.3.0
Operating System: Windows 10

Re: changed file folder name - cannot access web now

Postby Nobbie » 17. September 2023 15:12

jorr333@gmail.com wrote: I was in Explorer intending to have a descriptive folder name rather than the "WordPress" that was automatically created when downloading WordPress before creating the second local site.


You downloaded another WordPress installation (from a webserver=)? This does not work at all. You probably downloaded a .htaccess file (either to your htdocs folder or to WordPress folder) which may issue an invalid redirection. Try to delete the whole Xampp folder, install a new Xampp and install WordPress from scratch (from an installation file). Do NOT copy an existing online WordPress from the Internet to your local Xampp.
Nobbie
 
Posts: 13176
Joined: 09. March 2008 13:04

Re: changed file folder name - cannot access web now

Postby jorr333@gmail.com » 17. September 2023 17:13

No, I have not downloaded a second version. I'm glad you said not to, though because I would have. All I did was change the folder name, and change it back in the C:xampp/htdocs subfolder shown in the 3 lines below:

C:xampp/htdocs/wordpress
C:xampp/htdocs/newname
C:xampp/htdocs/wordpress

Everything was working fine before I changed the folder name.
Do you still think I have to delete and reinstall everything? If so, will I be able to save and restore all the work I did on the current web?
Last edited by jorr333@gmail.com on 17. September 2023 17:32, edited 1 time in total.
jorr333@gmail.com
 
Posts: 8
Joined: 16. September 2023 23:26
XAMPP version: 3.3.0
Operating System: Windows 10

Re: changed file folder name - cannot access web now

Postby Nobbie » 17. September 2023 17:24

Actually, I really dont know. My biggest concern is, that the error message "... localhost refused to connect" does NOT match to your situation.

Could you please try any other "wrong" (not existing) folder name in your URL, lets say please enter http://localhost/blablabla (yes! type "blablabla"!) into your browser. You probably dont have a folder "blablabla". What is the error message on that? Of course, start Xampp / Apache before.

P.S.: You also should look into your error_log plus your access_log if you find any hint.

P.P.S.:
jorr333@gmail.com wrote:If so, will I be able to save and restore all the work I did on the current web?


What do you mean by "current web"? What is that?
Nobbie
 
Posts: 13176
Joined: 09. March 2008 13:04

Re: changed file folder name - cannot access web now

Postby jorr333@gmail.com » 17. September 2023 17:44

Hey you are online!! Thanks for being here!!!

I opened Xampp, ensured apache and MySQL were running.
Changed the folder name to blablabla

Went to the URL and ensured it had the new folder name: http://localhost/blablabla/wp-admin/admin.php?page=avada
(typed in the blablabla)

And still get the same message:
This site can’t be reached localhost refused to connect.
Try:

Checking the connection
Checking the proxy and the firewall
ERR_CONNECTION_REFUSE

Current web is the site I've been developing - sorry I use the wrong terms. I'm totally self-taught.
jorr333@gmail.com
 
Posts: 8
Joined: 16. September 2023 23:26
XAMPP version: 3.3.0
Operating System: Windows 10

Re: changed file folder name - cannot access web now

Postby jorr333@gmail.com » 17. September 2023 17:47

I just noticed this message in the Xampp window:

1:37:14 AM [main] You are not running with administrator rights! This will work for
11:37:14 AM [main] most application stuff but whenever you do something with services
11:37:14 AM [main] there will be a security dialogue or things will break! So think
11:37:14 AM [main] about running this application with administrator rights!
11:37:14 AM [main] XAMPP Installation Directory: "c:\xampp\"
11:37:14 AM [main] Checking for prerequisites
11:37:14 AM [main] All prerequisites found
11:37:14 AM [main] Initializing Modules
11:37:14 AM [main] The Mercury module is disabled
11:37:14 AM [main] The Tomcat module is disabled
jorr333@gmail.com
 
Posts: 8
Joined: 16. September 2023 23:26
XAMPP version: 3.3.0
Operating System: Windows 10

Re: changed file folder name - cannot access web now

Postby Nobbie » 17. September 2023 17:48

Looks as if Apache is down?! What happens if you simply enter http://localhost - and also try to press Ctrl.+F5 in localhost
Nobbie
 
Posts: 13176
Joined: 09. March 2008 13:04

Re: changed file folder name - cannot access web now

Postby jorr333@gmail.com » 17. September 2023 17:57

I just reopened Xampp as an administrator, changed the file name back to WordPress and the site opened!! Where it said I could break things by not running in administrator was the key!
jorr333@gmail.com
 
Posts: 8
Joined: 16. September 2023 23:26
XAMPP version: 3.3.0
Operating System: Windows 10

Re: changed file folder name - cannot access web now

Postby jorr333@gmail.com » 17. September 2023 18:00

You have been really helpful. Going through the suggestions help me notice I was not running as Xampp as an admin. Thank you so much!

Do you have time to tell me how to start a second local WordPress site in Xampp? I'll be using Avada.
jorr333@gmail.com
 
Posts: 8
Joined: 16. September 2023 23:26
XAMPP version: 3.3.0
Operating System: Windows 10

Re: changed file folder name - cannot access web now

Postby Nobbie » 17. September 2023 18:45

I dont know Avada.

You can run as many WordPress as you want, actually you went the right direction, simply put each installation into its own folder (subfolder of htdocs). Either simply call these folder something like "wordpress1, wordpress2" or so, or call them semantically like "foodstore", "myshop" or whatever. Unzip the WhatsApp Installation File (which usually ships as a ZIP file), extract these and finally rename the folder to whatever you want. And after then start the installation process.

You also should create a new database for each WordPress installation (and provide these to the installation procedure), for ease of use i would recommend to call the databases same as you called the folders. Finally you can run your different WordPress installation by supplying the corresponding URL to the browser:

http://localhost/wordpress1
http://localhost/wordpress2
...

or

http://localhost/foodstore
http://localhost/myshop

and so on.
Nobbie
 
Posts: 13176
Joined: 09. March 2008 13:04

Re: changed file folder name - cannot access web now

Postby jorr333@gmail.com » 17. September 2023 23:17

Thank you so much Nobbie!! So I do need to install a version of WordPress for every local site correct?
I appreciate the time you gave me.
jorr333@gmail.com
 
Posts: 8
Joined: 16. September 2023 23:26
XAMPP version: 3.3.0
Operating System: Windows 10

Re: changed file folder name - cannot access web now

Postby Nobbie » 17. September 2023 23:22

Yes.
Nobbie
 
Posts: 13176
Joined: 09. March 2008 13:04


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 160 guests