Newbie question (sorry!)

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

Newbie question (sorry!)

Postby dogbed » 09. May 2019 09:56

Hi All,

Any assistance on this gratefully received.....

I want to load a WP backup onto localhost; I am doing this for one reason and that is to extract some of the page contents. I have XAMPP installed and working, database configured and imported, WP backup in HTdocs etc. After a few issues with the database connection I can now sort of connect.

If I go to localhost I get the index of my WP install; clicking on public_html/ opens a home page of sorts. It has all the links that were on my home page but no content whatsoever. It has the links that were in the widget footer and a few icons, the links that formed the menu at the top of the page but no content. Of course none of the links work as the URLs are all pointing to a www.@@@@@@.co.uk/page; I've tried changing them manually but get a content not found on the server error.

I know the backup I used to install is good as I'd done a full, live site migration with it a few months before I pulled the site down.

I'm hoping this is really obvious to somebody? If I could just get the text content out of the site that would be enough

Thank you in anticipation of salvation ;-)
dogbed
 
Posts: 3
Joined: 09. May 2019 09:43
XAMPP version: 7.3.5
Operating System: Win7 Pro

Re: Newbie question (sorry!)

Postby Nobbie » 09. May 2019 19:18

First of all, this is NOT a wordpress forum. And your problem is NOT a Xampp problem.

Anyway, a single clue for you:

The main problem is the domain name. Your wordpress is running on whatever domain (you did not tell us, why not?? is it a secret?? Nobody may know it??), your local copy is running on "localhost" (or any local IP). That is the main cause for all problems. There is one single trick how to overcome that problem: edit the windows hosts file of your Xampp PC and apply your public wordpress domain to your local PC. That means, enter the following line:

192.168.x.y www.@@@@@@.co.uk

where 192.168.x.y is the local LAN IP of your Xampp PC and www.@@@@@@.co.uk is the thing we may not know (but the rest of the world may know - crazy....).

This makes our local Xampp PC behave like your domain in the internet. If you like to access your Xampp from any other PC, you also have to adapt that line to the hosts file of that PC. Usually this *should* solve all problems with your local WP installation, BUT you cannot connect to your real WP installation from your PC now. Because all requests are routed to your Xampp PC (as long as you have your hosts file adapted).
Nobbie
 
Posts: 13170
Joined: 09. March 2008 13:04

Re: Newbie question (sorry!)

Postby dogbed » 10. May 2019 08:00

Hi Nobbie,

Thank you for responding to my post, I'm most grateful - though I'm uncertain why I have attracted such sarcasm for omitting to provide the domain name. It was / is www.exceedsamedaycouriers.co.uk. With regard to it NOT being a WP forum and NOT being a Xampp problem; well you don't know unless you ask do you? Rather frosty on this forum isn't it.....I don't post on any forums whatsoever so my apologies if I've broken some unknown rule by reaching out in such an uninformed manner :shock: :D :D :D :D

The live site was dropped months ago and after following the XAMPP installation instructions (editing the URL in wp-options via phpMyAdmin) I couldn't see detailing the domain actually had any bearing on the specifics of the problem nor potential solution. The URLs had been changed to http://localhost/exceedsamedaycouriers/ and when entering this in the browser my issue arose. Picture below.

I'm obviously connecting to the database as I have some of the site structure present but no content. I appreciate that I would have an issue clicking the links to other pages but could see no reason why the home page content would not pull through from the database when certain elements had. You'll have guessed I'm no expert :roll: but this was why I wondered if it was MySql issue or some other configuration issue.

Image

Following your instructions I have edited the hosts file (and returned wp-options back to https://www.exceedsamedaycouriers.co.uk) and I can connect but the issue remains. I have an image below - you should be able to see the URL in the browser to confirm I have followed your methodology. I still cannot connect to any other page nor is there any content on the page.

Image

I understand that this could ultimately be more WP biased but given the huge number of folks using XAMPP to facilitate WP staging and development sites I thought this remains an ideal place to ask for any guidance.

Hopefully there is an answer out there...

Best regards, James
dogbed
 
Posts: 3
Joined: 09. May 2019 09:43
XAMPP version: 7.3.5
Operating System: Win7 Pro

Re: Newbie question (sorry!)

Postby Nobbie » 10. May 2019 10:12

As you can see, the URL in your browser ends with "public_html", what should not be visible to the user. It looks for me as if you changed some wordpress configurations and also copied the installation to your local user folder instead of the htdocs folder of Xampp. I dont think you have a Mysql problem, instead you have a configuration problem. Unfortunately i am not a wordpress user, i cannot help you on wordpress.

There is also a link to "Home" in your document which seems to cause the 404 error. Find out to which location this link yields, that may help you to find the reason. The error_log from Apache as well as as the access_log should also give more information. But first of all it is on you, you should know where this "public_html" is coming from, maybe you overlooked any previous change. In order to run a local copy of your wordpress installation, you should not copy it to your local user folder, instead copy it to htdocs evtly. to the same subfolder as it has been online. The goal is NOT to change any wordpress configuration or as less as possible.
Nobbie
 
Posts: 13170
Joined: 09. March 2008 13:04

Re: Newbie question (sorry!)

Postby dogbed » 10. May 2019 12:38

Hello,

Thank you for coming back to me - I do appreciate it.

I thought at first you were completely wrong - as far as I was aware I had followed the installation instructions to the letter. In fact I got the image below to prove that I had copied the installation to the htdocs folder - the tutorials I followed all show simply dropping the WP backup folder into htdocs is the process.

Image

And then it dawned on me. I should have copied the contents of public_html from inside my WP backup (within www.exceedsamedaycouriers.co.uk folder) directly into the htdocs folder!!! Sorry if this was obvious. :roll: Works perfectly now - thank you. Like really thank you! It's a shame that I ran into this despite numerous tutorials I viewed as looking back its actually very obvious....

Image

I don't have some of the images which I think is because they were on a CDN server via Jetpack (subscription expired) which doesn't matter as the text content is there - all I had to do to fix the link URLs was click "save" in the wp-admin / permalinks.

I knew the answer would be here somewhere; just having some external input to make you think a bit harder is sometimes all you need to isn't it? It doesn't matter that you're not a WP user as you gave me another aspect to consider. Thanks again.

Regards, James
dogbed
 
Posts: 3
Joined: 09. May 2019 09:43
XAMPP version: 7.3.5
Operating System: Win7 Pro


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 134 guests