WordPress Slimming: Let your website fly

Source: Internet
Author: User
Keywords WordPress Slimming

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

WordPress as a good blog program, has gone out of the blog field, rampant in various industries in the site. I also contact and use WordPress blog has more than half a year, the use of this system skills, but also some small suggestions to share to everyone, today first share two WordPress slimming small method, so that your wrodpress more concise, clean.

The first is the thin body of the picture, many friends choose WordPress to do the site, are looking at his image processing function is very powerful, as we are more familiar with the Dedecms and Zblog, the image processing (especially thumbnails) are not in place, a site may be in different areas need different size thumbnails, This use of WordPress light and easy to pick can be trimmed, but dedecms only to the CSS control, in the IE core browser under the picture with the proportion of the zoom will be distorted, and zblog there is no thumbnail function.

But if WordPress is improperly set up, you upload each picture will be three different size of the crop, each picture will appear four files, if you have 5 pictures, you may use the thumbnail is a, but the system will automatically appear 4*5, such as 20 pictures, So it's a huge waste of space. The author of this article suggests that if the blog does not need thumbnail function, the background media settings and then the picture settings are all set to 0, the following figure:

  

So you upload the picture system will not automatically cut. But if you need to use thumbnails, then I suggest you use a thumbnail plugin such as (wp-thumbnails), this plug-in can be designed only for the first picture thumbnail or a few pictures, or the WordPress supported Timthumb function to crop the first picture as a thumbnail, And the size can be arbitrarily set, so that the system will not automatically cut many but not use the thumbnail, greatly saving your space.

The next is the page code of thin body, wordpress default head code a lot of, but for us ordinary stationmaster, do not need, that needs us to remove those redundant code, only retain the title of the page, keywords, and description and CSS reference code is best. At this point you need to add the following code to the functions file in the topic:

Remove_action (' Wp_head ', ' wp_generator ');

Remove_action (' Wp_head ', ' wlwmanifest_link ');

Remove_action (' Wp_head ', ' rsd_link ');

Remove_action (' Wp_head ', ' index_rel_link '); Removes the index link

Remove_action (' Wp_head ', ' Parent_post_rel_link ', 10, 0); Removes the prev link

Remove_action (' Wp_head ', ' Start_post_rel_link ', 10, 0); Removes the start link

Remove_action (' Wp_head ', ' adjacent_posts_rel_link_wp_head ', 10, 0); Removes the relational links for the posts adjacent to the current post.

Remove_action (' Wp_head ', ' feed_links ', 2);//ºfeed

Remove_action (' Wp_head ', ' Feed_links_extra ', 3); Feed

Remove_action (' Wp_head ', ' wp_print_head_scripts ', 9);

Remove_action (' Wp_head ', ' rel_canonical ');

Remove_action (' Wp_head ', ' wp_shortlink_wp_head ', 10, 0);

After you add this code, you can open your home page and look at the source file, and you'll find that the head is clean. Today to share with you this two points WordPress slimming method, while Lily Theater will continue to share the quality of WordPress use skills, the article Yulili Cinema (http://www.lili1989.net) first A5, reproduced please indicate the source, thank you.

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.