错误:文件“wp-config.php”已经存在
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/32686663/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
ERROR: The file 'wp-config.php' already exists
提问by mgrantnz
I clicked on the 'Update WordPress' link in the admin dashboard of my WordPress site, and I am getting this error:
我点击了我的 WordPress 网站管理仪表板中的“更新 WordPress”链接,我收到了这个错误:
"The file 'wp-config.php' already exists. If you need to reset any of the
configuration items in this file, please delete it first. You may try installing now."
When I try to click the "installing now" link, it seems that WordPress is installing fresh. I want to keep all of the content of my WordPress installation.
当我尝试单击“立即安装”链接时,似乎 WordPress 正在安装新的。我想保留我的 WordPress 安装的所有内容。
I have tried to change the name of the wp-config.php file but that didn't do anything.
我试图更改 wp-config.php 文件的名称,但没有做任何事情。
回答by Pierre R
Is just a browser cache.
只是一个浏览器缓存。
On first URL load, you are redirected from domain.ext
to domain.ext/wp-admin/setup-config.php
在第一次 URL 加载时,您被重定向domain.ext
到domain.ext/wp-admin/setup-config.php
If you are on Chrome, just open the developers console, go to "Network" tab. Reload the page and right click anywhere in the console, and hit "Clear browser cache".
如果您使用的是 Chrome,只需打开开发者控制台,转到“网络”选项卡。重新加载页面并右键单击控制台中的任意位置,然后点击“清除浏览器缓存”。
Now refresh again and you will see your website
现在再次刷新,您将看到您的网站
回答by Marc
I ran into this same issue while I was transferring a site. The issue ended up being with the .htaccess
file. I fixed it by resetting my permalinks. There may be other causes to this issue but this worked for me:
我在转移网站时遇到了同样的问题。问题最终出在.htaccess
文件上。我通过重置我的永久链接来修复它。此问题可能还有其他原因,但这对我有用:
- Click on General => Permalinks
- Click Save Changes (to reset permalinks)
- 单击常规 => 固定链接
- 单击保存更改(重置永久链接)
回答by Rustem Hesenov
Try to display the website first on the incognito tab. If it works correctly, clear the browser cache.
尝试先在隐身选项卡上显示网站。如果它工作正常,请清除浏览器缓存。
Once the page refresh has been completed, the website will appear.
页面刷新完成后,网站将出现。
You can use the following shortcuts to clear the browser cache.
您可以使用以下快捷方式清除浏览器缓存。
Windows: Ctrl + F5 Mac OS: CMD + Shift + R
Windows:Ctrl + F5 Mac 操作系统:CMD + Shift + R
回答by Amin Darvand
This usually happens when you use an old version of Wordpress files or old database, and you use partly new files of Wordpress.
当您使用旧版本的 Wordpress 文件或旧数据库,并且使用部分新的 Wordpress 文件时,通常会发生这种情况。
All you need to do is to delete all WP files and install a fresh Wordpress (new files unzipped from a new version of Wordpress) and use an empty database. If you're planning to migrate or move from another website, you should use the export/import function built in wordpress.
您需要做的就是删除所有 WP 文件并安装新的 Wordpress(从新版本的 Wordpress 解压缩的新文件)并使用空数据库。如果您打算从其他网站迁移或迁移,则应使用 wordpress 内置的导出/导入功能。
回答by Alexandre Babeanu
If you are using bluehost and did not do the one click install :
如果您使用的是 bluehost 并且没有执行一键安装:
I solved this problem by deleting the default error pages 404.php 500.php etc...
我通过删除默认错误页面 404.php 500.php 等解决了这个问题...
I do not know why exactly this was causing this issue... Sorry for the sloppy answer but tried clearing cache and recreating the .htaccess file it didn't work.
我不知道这到底是为什么导致这个问题......抱歉我的回答很草率,但尝试清除缓存并重新创建 .htaccess 文件它没有用。
回答by Alexandre Babeanu
Maybe you could try to delete 'wp-config.php' file, or take a backup of this file in different folder and then try again.
也许您可以尝试删除“wp-config.php”文件,或将此文件备份到不同文件夹中,然后重试。
回答by ABHAY KUMAR
he file wp-config.php already exists. If you need to reset any of the configuration items in this file, please delete it first. You may try installing now.
文件 wp-config.php 已经存在。如果您需要重置该文件中的任何配置项,请先将其删除。您现在可以尝试安装。
Answer:-Please Clear Your browser's cache.
答:-请清除浏览器的缓存。
回答by PJ Evans
I removed the added spaces that the Wordpress's own web 'easy installer' created in the wp-config.php
file to help me out.
我删除了 Wordpress 自己的网络“简易安装程序”在wp-config.php
文件中创建的添加空格以帮助我。
Guess the Wordpress's own wp-config.php ?checker? isn't compatible with Wordpress's own installer. Wow.
猜猜 Wordpress 自己的 wp-config.php ?checker?与 Wordpress 自己的安装程序不兼容。哇。
Once the added spaces were removed, site comes up fine. I simply modeled the spacing that is in the wp-config-sample.php file.
一旦删除了添加的空格,站点就可以正常运行。我只是模拟了 wp-config-sample.php 文件中的间距。
回答by Solution
Because you just installed wp.
因为你刚刚安装了wp。
Just hit ctrl+F5
done!!!
刚打完ctrl+F5
!!!
回答by Pardeep Pathania
I also meet with same error and Mr Pierre R is right its just a cache. Just clear your cache or check in private window. All fine.
我也遇到了同样的错误,Pierre R 先生是对的,它只是一个缓存。只需清除您的缓存或检查私人窗口。一切都很好。