Slow wordpress access optimization method

Source: Internet
Author: User
Tags pack php file

Loading language pack prohibited

Modify the wp-config.php file to prevent WordPress from loading language packs at the foreground.

Open the wp-config.php file and find require_once (ABSPATH. 'WP-settings. Php'); change to the following code:

The code is as follows: Copy code
If (WP_ADMIN === true ){
Define ('plang ', 'zh _ cn ');
} Else {
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 testing and removing the language pack, the WordPress running speed can be improved by 0.3 ~ About 0.5 s. Don't underestimate the 0.5 S. It can significantly improve the speed of opening your website.

Enable Gzip compression

Gzip compression can reduce the transmission volume of static html, php, js, css and other files. Generally, each page can reduce the volume by about 70%. When the server bandwidth is limited, the page opening speed can be significantly improved; especially for foreign servers and Hong Kong servers.


Reasonable disposal of javascript, css and other files

Merge javascript, css, and other files as much as possible to reduce the number of concurrent page requests and improve the page opening efficiency. The UI icons and images on the website page are merged as much as possible to reduce the size of the images and greatly reduce the number of page requests.

Javascript files and javascript code can increase the page display speed if you do not need to put them at the end of the page as much as possible. Css files and internal style sheets should be placed in the

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.