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

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



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.