Apache/2.4.46 (Win64) PHP/7.3.21 Server at localhost Port 80
Posted by: ruak (---.17-2.cable.virginm.net)
Date: November 11, 2020 02:52AM

Hi,

I'm new to this and out of my depth. I've downloaded a wordpress site from a host and have loaded the database in phpmysql and added sql. All the other files I've put into a file in wamp directory and done the virtual host thing but when I try and load it I get this message:

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at wampserver@wampserver.invalid to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.

Apache/2.4.46 (Win64) PHP/7.3.21 Server at xxxxxx Port 80


I did a test port 80 and this is what it said:


***** Test which uses port 80 *****

===== Tested by command netstat filtered on port 80 =====


Test for TCP
Your port 80 is used by a processus with PID = 28064
The processus of PID 28064 is 'httpd.exe' Session: Services
The service of PID 28064 for 'httpd.exe' is 'wampapache64'
This service is from Wampserver - It is correct

Test for TCPv6
Your port 80 is used by a processus with PID = 28064
The processus of PID 28064 is 'httpd.exe' Session: Services
The service of PID 28064 for 'httpd.exe' is 'wampapache64'
This service is from Wampserver - It is correct

===== Tested by attempting to open a socket on port 80 =====

Your port 80 is actually used by :

Server: Apache/2.4.46 (Win64) PHP/7.3.21



I have read lots of stuff on the net but am at a total loss. Any help given will be gratefully received.



Edited 1 time(s). Last edit at 11/14/2020 10:12PM by ruak.

Re: Apache/2.4.46 (Win64) PHP/7.3.21 Server at localhost Port 80
Posted by: Otomatic (Moderator)
Date: November 11, 2020 08:56AM

Hi,

Check out the WordPress codex on "how to upload a WordPress site".

WordPress writes its base URL into its database, so if you change it - and it does by uploading the site locally - you have to change that base URL in the database.

On the other hand, CMS and WordPress in particular must be installed in VirtualHosts, even locally, as with all hosters, so as your WordPress was with your host.
See:
The need for Virtual Host
and
Wampserver 3 - Create or add a VirtualHost
and
Why to create a VirtualHost BEFORE installing a CMS

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons



Edited 1 time(s). Last edit at 11/11/2020 10:24AM by Otomatic.

Re: Apache/2.4.46 (Win64) PHP/7.3.21 Server at localhost Port 80
Posted by: ruak (---.17-2.cable.virginm.net)
Date: November 12, 2020 01:22AM

Hi, Thank you for your suggestions but I have sat and read for days now and tried everything people have said but to no avail. The closest i've got is following [www.techrepublic.com] At least now I am at the point where I have:

Index of /
[ICO] Name Last modified Size Description
[ ] xxxxxx.zip 2020-11-11 19:12 1.0G
[DIR] xxxxxxx/ 2020-11-11 19:14 -
Apache/2.4.46 (Win64) PHP/7.3.21 Server at xxxxxx.co.uk Port 80

but when I click on Parent Directory all I get id this:

Index of /xxxxxxx
[ICO] Name Last modified Size Description
[PARENTDIR] Parent Directory -
Apache/2.4.46 (Win64) PHP/7.3.21 Server at xxxxxx.co.uk Port 80

I keep reading different websites and cannot find a solution. I feeI I am slowly losing the will to live. Is there anyone out there who can give me straight and simple answers?



Edited 2 time(s). Last edit at 11/14/2020 10:13PM by ruak.

Re: Apache/2.4.46 (Win64) PHP/7.3.21 Server at localhost Port 80
Posted by: Otomatic (Moderator)
Date: November 12, 2020 09:13AM

Hi,

There is no simple answer.

The link you gave is for Wampserver 2.4 and is totally obsolete.

I have previously given you several links including one that allows you to create a VirtualHost in three mouse clicks and that works perfectly with Wampserver 3.

Read the three previous links again and not diagonally.

See also the content of the .htaccess file.

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Re: Apache/2.4.46 (Win64) PHP/7.3.21 Server at localhost Port 80
Posted by: ruak (---.17-2.cable.virginm.net)
Date: November 12, 2020 07:04PM

Hi,

I've tried everything you suggested. After loading the data base successfully I did SQL and changed name from [www.xxxxxx.co.uk] to xxxxxx.local > loaded all files into www > created virtual host > xxxxxx.local > C:wamp64.www.xxxxxx >reloaded DNS > clicked on VH xxxxxx.local and it came back with Page not found, so moved files directly into C:then did another SQL changing name to localhosl.xxxxxx (spelt host wrong) . Created another VH called localhosl.xxxxxx at C: > reloaded DNS and ran it again and this is what it came back with:


Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at wampserver@wampserver.invalid to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.

Apache/2.4.46 (Win64) PHP/7.3.21 Server at localhosl.xxxxxx Port 80


And below is the windows hosts and config file:


WINDOWS HOSTS


#
127.0.0.1 localhost
::1 localhost
#
127.0.0.1 xxxxxx.local
127.0.0.1 localhosl.xxxxxx
::1 localhosl.xxxxxx



HTTPD-VHOSTS


# Virtual Hosts
#
<VirtualHost *:80>
ServerName localhost
ServerAlias localhost
DocumentRoot "${INSTALL_DIR}/www"
<Directory "${INSTALL_DIR}/www/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>


#
<VirtualHost *:80>
ServerName xxxxxxx.local
DocumentRoot "c:/wamp64/www/xxxxxx"
<Directory "c:/wamp64/www/xxxxxx/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>


#
<VirtualHost *:80>
ServerName localhosl.xxxxxxx
DocumentRoot "c:/xxxxxx"
<Directory "c:/xxxxxxx/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>


If there is any light you could shine on this I would be grateful.



Edited 1 time(s). Last edit at 11/14/2020 10:09PM by ruak.

Re: Apache/2.4.46 (Win64) PHP/7.3.21 Server at localhost Port 80
Posted by: Otomatic (Moderator)
Date: November 12, 2020 08:05PM

Hi,

See.. .htaccess file in the root of your site.

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Re: Apache/2.4.46 (Win64) PHP/7.3.21 Server at localhost Port 80
Posted by: ruak (---.17-2.cable.virginm.net)
Date: November 12, 2020 08:36PM

Hi,

This is the .htaccess file



Header always set Content-Security-Policy "upgrade-insecure-requests;"

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ []%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

# 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 /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress


What should I be looking for?

Re: Apache/2.4.46 (Win64) PHP/7.3.21 Server at localhost Port 80
Posted by: ruak (---.17-2.cable.virginm.net)
Date: November 12, 2020 08:38PM

Hi,

Is it the https? should I change it to http?

Re: Apache/2.4.46 (Win64) PHP/7.3.21 Server at localhost Port 80
Posted by: ruak (---.17-2.cable.virginm.net)
Date: November 12, 2020 10:41PM

Hi,


Now it's saying Error establishing a database connection

Re: Apache/2.4.46 (Win64) PHP/7.3.21 Server at localhost Port 80
Posted by: ruak (---.17-2.cable.virginm.net)
Date: November 12, 2020 11:08PM

Hi,

I deleted everything apart from xxxxxx(wordpress file). I deleted the htaccess file. and moved website (xxxxxx) to D:/ because there is more space on there. started again added bd and changed change name, please see below:

UPDATE wp_options SET option_value = replace(option_value, 'https://www.xxxxxx.co.uk', 'http://xxxxxx.local') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET post_content = replace(post_content, 'https://www.xxxxxx.co.uk', 'http://xxxxxx.local');
UPDATE wp_postmeta SET meta_value = replace(meta_value,'https://www.xxxxxx.co.uk','http://xxxxxx.local');

Then did the VH using xxxxxx.local and D:/xxxxxx tried loading it and that's when I got the error.
White page with grey box saying Error establishing a database connection.



Edited 1 time(s). Last edit at 11/14/2020 10:04PM by ruak.

Re: Apache/2.4.46 (Win64) PHP/7.3.21 Server at localhost Port 80
Posted by: ruak (---.17-2.cable.virginm.net)
Date: November 12, 2020 11:32PM

Hi,

It's okay I solved it. Changed it in wp-config to root user_name and got rid of password, also went into mariadb > my.ini and changed port to 3306 from 3307.

Many thanks for all your help and guidance. Hopefully I won't have to come back to you but don't hold your breath.

Re: Apache/2.4.46 (Win64) PHP/7.3.21 Server at localhost Port 80
Posted by: ruak (---.17-2.cable.virginm.net)
Date: November 12, 2020 11:36PM

Hi,

Don't believe it, spoke to soon. The page it's loading is xxxxxx.co.uk? Any ideas?



Edited 1 time(s). Last edit at 11/14/2020 10:16PM by ruak.

Re: Apache/2.4.46 (Win64) PHP/7.3.21 Server at localhost Port 80
Posted by: ruak (---.17-2.cable.virginm.net)
Date: November 13, 2020 02:09AM

Hi,

After some very extensive searching and reading I came across a site about phpmyadmin and there it said that after adding the DB code to switch from old url to new I should check the wp_options file in the DB. Look for siteurl and home so I did and they where still showing the old url. I edited it and changed them to the new url and hey presto it's worked. Just thought I share that with you and anyone else who may be struggling.

Many thanks again, I'm sure it won't be the last time you hear from me. Bye for now.

Re: Apache/2.4.46 (Win64) PHP/7.3.21 Server at localhost Port 80
Posted by: ruak (---.17-2.cable.virginm.net)
Date: November 13, 2020 02:25AM

Hi,

You're not going to believe this but when I type in at the end of the address shown i.e. [xxxxxx.local] or login I get this:

Not Found
The requested URL was not found on this server.

Apache/2.4.46 (Win64) PHP/7.3.21 Server at xxxxxx.local Port 80

??? I'm very tired now so going to bed, only spent three whole days on it.

: (



Edited 2 time(s). Last edit at 11/14/2020 10:18PM by ruak.

Re: Apache/2.4.46 (Win64) PHP/7.3.21 Server at localhost Port 80
Posted by: ruak (---.17-2.cable.virginm.net)
Date: November 13, 2020 03:08AM

Hi,

Managed to get login page up by adding wp_login [xxxxxx.local] but now it wants a password. I changed the use name to roor and left the password blank in wp-config.I've even read abut changing it in phpmyadmin by editing wp_users, which I have done and changed the username to root and deleted the password but it still doesn't work.

As always any help will be gratefully received.



Edited 1 time(s). Last edit at 11/14/2020 10:20PM by ruak.

Re: Apache/2.4.46 (Win64) PHP/7.3.21 Server at localhost Port 80
Posted by: Otomatic (Moderator)
Date: November 13, 2020 09:34AM

Hi,

I am neither a WordPress specialist nor an expert in .htaccess files, but if I had to migrate a WordPress site, I would have simply followed the explanations given by WordPress itself :

Moving WordPress

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Sorry, only registered users may post in this forum.