Five basic tips to speed up WordPress site

Source: Internet
Author: User
Keywords WordPress Accelerate

Intermediary transaction http://www.aliyun.com/zixun/aggregation/6858.html ">seo diagnose Taobao guest cloud host technology Hall

We all want someone to visit their WordPress site, you can quickly see the article, but not the following basic optimization techniques, how can it be achieved?

General Front-End performance optimization

Whether your site is based on what background technology to achieve, when visitors visit, always generate regular HTML, CSS, JavaScript and other files sent back to the client. To speed up your site, you can first optimize from the front.

Front-End performance optimization is a very deep thing, there are many techniques and methods, but you may be a webmaster rather than professional front-end engineers, so here I only summed up a few basic but very effective front-end performance optimization techniques:

Compressed pictures: The downloading of pictures takes up a lot of time while the page is open, and if you compress these pictures or other tricks (such as lazy load), you can reduce the time. Practice has proved that 80% of JPG image compression, not only to ensure that the naked eye can not see the quality problems, but also reduce some of the size of the PNG format pictures, you can use Tinypng to compress.

Merged files: Here the file is mainly refers to CSS, JavaScript files, page every more than one CSS, JavaScript file, browser will be more than one HTTP request, there will be more than one wait time. Ideally, there is only one CSS, JavaScript file, and compression to make its files as small as possible, this suggestion to use WP minify plug-ins. If you have the ability, can also merge the icon, some small pictures merged, made CSS Sprite.

Using CDN: If your server is in Beijing, Beijing will be very fast, but visitors in Guangdong may feel slow due to distance and line problems. Mature CDN service providers all over the country will have servers, if you put the static file above, Guangdong area visit your website, will download files from the server near Guangdong, and CDN server and broadband for downloading to do the optimization, speed will generally exceed your server, so you can greatly speed up, At present, it is generally recommended to use seven cattle cloud storage to speed up static files, there are WordPress plug-ins: Seven Cattle mirrored storage WordPress plug-ins.

For ordinary webmaster, understand these can be, the following to talk about the optimization of the WordPress site.

Installing Cache Plug-ins for WordPress

Caching is a very important thing to improve speed. When you visit a Web site, the cache optimization, will be some pictures and CSS, JS files cached to your computer. The next time you visit, the browser finds that the files in the cache are not expired, and immediately calls from the cache, and it is no longer downloaded from your server. This way, you just need to download a few KB of the text you write on the OK, of course, the speed of the opening quickly.

WordPress cache, to see your server support level, if your server has installed memory cache These components, install the Memcached plug-in is the most optimized, if it is a virtual host, it is recommended to install WP Super cache.

Caching using. htaccess files

The above is through the installation of Plug-ins to cache, if you do not want to install Plug-ins, you can use the following methods to cache.

Modify the following code according to your requirements and place it in the. htaccess file below the root directory of your WordPress site:

The above code makes the simple annotation, the cache time mainly relies on the following max-age parameter, is in the second as the unit, the cache time above parameter is to cache the file type.

Note that while caching is good, it is not the longer the cache time. Some static files, long time will not change their content, you can set a longer time. Some dynamic files, often modified, you need to set a shorter time. Once had a friend's blog one months did not update, asked him to know is the cache settings are wrong, the result of opening the time is still a long time before the content.

Reduce database queries

Dynamic Web sites are sure to make some queries on the database, and each query, to establish a database connection, and then wait for the database to return data and output. This process will be a waste of time. WordPress, there are a lot of unnecessary inquiries and the use of features, remove these can speed up.

You can use this code to see how many queries you have built in WordPress, you can copy it to the functions.php file under the theme directory, you can see the information at the bottom:

As for how to do this optimization, in my favorite boiled fish have a lot of skills to turn off useless features, you can follow your own needs to search.

Find a reliable mainframe.

Finding a reliable host is the most effective. To do the best optimization, the result is placed in a frequent ventilation, broadband and telephone line like the server, certainly open very slowly. Select the host is a very complex and huge content. If the budget is adequate, you can choose media Temple such hosts, the general user recommends the use of Bluehost virtual host.

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.