Today, a customer suddenly came to me anxiously, and his website could not be opened! Let me solve it for him. The program reported an error. I checked the cause and found that the root directory of the website was infected with malicious scripts.
I told him that the best solution to this problem is to reinstall and install the wordpress program.
Why overwrite the installation instead of reinstallation? This is because the overwrite installation will retain Chinese source files and pseudo static files of the program, as well as some images and installed plug-ins. If you reinstall it, the entire program will be replaced.
After overwriting and installation, the customer encountered another problem, that is, he upgraded the database at the same time, so here the peak reminds the new webmaster. The application and database must be upgraded at the same time. The habit of backing up the database before the upgrade is that data is the soul of a website.
After the database is upgraded, the configuration file will be lost due to some reasons! Therefore, the background of his website is changed to English.
In this case, the problem is also well solved. Set the position in the figure below.
What if the problem persists?
Locate 72 lines of code in the wp-config.php in the website root directory and find:
1. Add a language file and put it under the "wp-content" Directory of the wordpress program directory (put the language file in the language directory );
2. Change the configuration file wp-config.php in define ('wplang ', "); change to define ('wplang', 'zh _ cn.
After modification, the system changes back to Chinese! (The frontend and backend will be changed)
The problem persists. Make sure that the Chinese voice package is installed in your wordpress program.
Solution 2
In addition, there is a simpler way to upload language files. The method is:
- Edit wp-config.php filesNoIn Notepad, you can download it and modify it in programs such as editplus or dreamweaver-because notepad will change the text encoding in the file content. Although we look the same, the program will not recognize it when reading it.
- Go to the wordpress background, click "Dashboard" at the top left, expand, and then click "Updates"
At this time, you will see the following on the right side
Click Update Automatically. After the upgrade, the Chinese page is displayed.