Home > Article > CMS Tutorial > What to do if wp config.php cannot be found
The solution for wp config.php not found: 1. Add a "wp-config.php" file; 2. Restart the web server; 3. Change the WordPress installation package to the Chinese version, and then Just install it.
The operating environment of this article: Windows 7 system, WordPress version 5.4.2, DELL G3 computer
Prompt for accessing the wordpress site How to solve the problem if there is no wp-config.php file?
How to solve the problem when the wp-config.php file cannot be found or the file does not exist when accessing the wordpress site?
The general solution to this problem is to add a wp-config.php file yourself. How to write this file?
You can refer to the wp-config-sample.php file to write and modify the database information in it.
For example:
Change it to:
and then save the file. You can change the file name to wp-config.php, so that when installing WordPress, the step of filling in the database information will be completed automatically, and you do not need to fill it in again. That is the following page:
If there is no response after modification, remember to restart the web server, such as Apache, NGINX or IIS. It depends on which server type you are currently using.
Where to restart the web server?
Click "Software Management" on the left side of the panel and select "Running Environment". For example, I am using an IIS server here, then select this and click "Settings" - "Restart".
Another solution is to change the WordPress installation package to the Chinese version and try to install it again. You can refer to manually adding a site to deploy wordpress
Finally, you can try restarting your Linux or Windows cloud server and try again.
Recommended learning: "WordPress Tutorial"
The above is the detailed content of What to do if wp config.php cannot be found. For more information, please follow other related articles on the PHP Chinese website!