Wordpress install fails with PHP error
Posted by: Doncaver (---.dhcp.hspr.ca.charter.com)
Date: December 26, 2017 06:10PM

Problem installing Wordpress in WAMP. I installed WAMP server on my Windows 10 PC. Installed Wordpress 4.9.1 into www dir as /wordpress. Created DB, with new user. Then used localhost/wordpress/wp-admin/ to install it. Now I get what I think is a PHP error from the index PHP file on /Wordpress. When I try to run the new app via ‘localhost/wordpress’ I receive:

( ! ) Warning: require_once(C:\wamp64\www\wordpress/admin.php): failed to open stream: No such file or directory in C:\wamp64\www\wordpress\index.php on line 10
Call Stack
# Time Memory Function Location
1 0.3506 278880 {main}( ) ...\index.php:0

( ! ) Fatal error: require_once(): Failed opening required 'C:\wamp64\www\wordpress/admin.php' (include_path='.;C:\php\pear') in C:\wamp64\www\wordpress\index.php on line 10
Call Stack
# Time Memory Function Location
1 0.3506 278880 {main}( ) ...\index.php:0

So where did I go wrong and how do I fix it?
What is the recommended method of install for Wordpress: 1. into www. root or 2. as www/Wordpress/ ?


More info:

I have followed two different installer’s videos on Youtube, both
have had problems. I’m not trying to be tricky, I want short and smooth. Thanks. Don

There is no ‘C:\php’ on my PC.

Below is httpd-vhosts contents. Httpd modified to point to it.

# Virtual Hosts
#
####12/24/17 dpd per einseteinsboi you tube video
<VirtualHost *:80>
ServerAdmin admin@localhost
DocumentRoot "C:/wamp64/www"
ServerName localhost
ServerAlias www.localhost
ErrorLog "logs/localhost-error.log"
CustomLog "logs/localhost-access.log" custom
</VirtualHost>

I added a virtual host for /wordpress. This doesn’t change the problem

Add to hosts
127.0.0.1 wordpress

Add to virtual hosts
<VirtualHost *:80>
ServerName wordpress
DocumentRoot "c:/wamp64/www/wordpress"
<Directory "c:/wamp64/www/wordpress/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>

Options: ReplyQuote
Re: Wordpress install fails with PHP error
Posted by: Otomatic (Moderator)
Date: December 26, 2017 10:10PM

Hi,

Web applications and CMS in general, and WordPress in particular, must be installed in a VirtualHost and this VirtualHost must exist before installation.
See The need for Virtual Host

See also WordPress Codex

------------------------------------------------------------------------------------------------------------
Wampserver 3.1.3 32 bit - Apache 2.4.34 - PHP 7.2.8/7.1.20/7.0.31/5.6.37 - MySQL 5.7.23 - MariaDB 10.3.8
Wampserver 3.1.3 64 bit - Apache 2.4.34 - PHP 7.2.8/7.1.20/7.0.31/5.6.37 - MySQL 5.7.23 - MariaDB 10.3.8
PhPMyadmin 4.8.2 - MysqlDumper 1.24.5
on W10 and W7 Pro 64 bit
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons
« Ce n'est pas parce qu'ils sont nombreux à avoir tort, qu'ils ont forcément raison. Coluche »
« It's not because they are many to be wrong, they are necessarily right. Coluche »



Edited 1 time(s). Last edit at 12/26/2017 10:11PM by Otomatic.

Options: ReplyQuote


Sorry, only registered users may post in this forum.