We know that WordPress has a multi-language function. WordPress uses the getText class library to implement multi-language functions, but this library runs less efficiently, which seriously affects the running speed of WordPress. Because of the domestic
WordPress blogs use a Chinese version of the topic. Therefore, you can load language packs at the front-end of the WordPress website. (If you are young, it means you are useless. If you are a young user, kill it)
Method:
Modify the wp-config.php file to prevent WordPress from loading language packs at the foreground.
Open the wp-config.php file and find
The code is as follows: |
Copy code |
Require_once (ABSPATH. 'WP-settings. Php '); |
Change to the following code:
The code is as follows: |
Copy code |
If (WP_ADMIN === true ){ Define ('plang ', 'xxxxxxxxxxx '); } Require_once (ABSPATH. 'WP-settings. Php ');
|
This method changes the WPLANG constant so that WordPress cannot correctly load the language pack to speed up running. After removing the language pack, WordPress
The running speed can be accelerated for up to half a second. Well, half a second is not a small speed. It would have been less than two or three seconds since the website was opened, but it would have been opened in just one second. Hey hey, the speed is half a second and the speed is half a second. You know.