Reputation: 13748
OS :ubuntu
when I enter http://127.0.0.1/wordpress
,
show error:
Neither /etc/wordpress/config-127.0.0.1.php nor /etc/wordpress/config-0.0.1.php could be found.
Ensure one of them exists, is readable by the webserver and contains the right password/username.
but http://localhost/wordpress
can access
I had used command bash /usr/share/doc/wordpress/examples/setup-mysql -n wordpress localhost
which may cause this error.And I also want to figure out what that command means.
Upvotes: 0
Views: 6424
Reputation: 1866
Try to see if the mapping is set to resolve localhost to 127.0.0.1
try:
$ sudo chmod 644 /etc/hosts
$ cat /etc/hosts
127.0.0.1 localhost
Upvotes: 0
Reputation: 777
As per the above answer, this did not work, one Debian Jessi 8.1, because /etc/wordpress/config-default.php does not exist.
However, I did:
ln -s /etc/wordpress/config-dev.php /etc/wordpress/config-localhost.php
which got me past this hurdle. However, the next problem is " As per the above answer, this did not work, one Debian Jessie 8.1, because /etc/wordpress/config-default.php does not exist.
However, I did:
ln -s /etc/wordpress/config-dev.php /etc/wordpress/config-localhost.php
which got me past this hurdle.
However, the next problem is "Error establishing a database connection" which is beyond the scope of this question.
Upvotes: 0
Reputation: 13748
finaly,I figure it out myself.
http://192.168.2.16/wordpress
sudo ln -s /etc/wordpress/config-localhost.php /etc/wordpress/config-default.php
(this is because at last wp-config.php looks for config-default.php)then,this problem solved~
Upvotes: 2
Reputation: 3518
Your Wordpress database is probably configured for 'localhost' You need to change a couple of table entries to make it work
Upvotes: 0