Optimize wordpress Google fonts to speed up running _php instances on domestic servers

Source: Internet
Author: User
Google fonts cannot be loaded without flipping the walls because Google is completely walled off. Many novice friends often complain about how slow they buy the host, give the example station seconds open, but their station to a few 10 seconds to open, and is a new installation of the WordPress site, no pictures are also very slow. In fact, many times the speed of WordPress is not the main reason for the host, but because Google fonts, today we will provide you with an optimized Google font of the ultra-detailed tutorial, small white dedicated.

How to see if your website contains Google fonts

First of all, open Firefox or Chrome, into stealth mode, Firefox can use shortcut keys Ctrl+alt+p,chrome can be ctrl+alt+n with shortcut keys.

Second, into the developer mode, two browsers can be accessed with a shortcut ctrl+alt+n. Here we take Firefox as an example.

Then visit your website, under the window will load content sorted by the domain name, you can see the content of ' fonts.googleapis.com ', it means that your WordPress really quoted Google fonts.

In Chrome, it looks like this:

Optimize Google Font Scheme 1:

Install plug-ins, this is the simplest direct method, more suitable for beginners. In the WordPress background search ' Disable Google Fonts ', then will come out a bunch of plugins, ranked in front of the two plugins are "Disable Google Fonts" and "Remove Google fonts References". Pro-Test "Remove Google Fonts Reference" plugin is more effective.

Optimize Google Font Scheme 2:

Modify the WordPress code. If you can modify your WP code via FTP or online file editor, this is an effective method. To novice webmaster also don't worry, even if you do not have any code base, follow the tutorial step by step to do it. Open the wp-includes/scriptes-loader.php file and if you downloaded it locally via FTP, it is recommended to use notepad++ to open it. Replace Googleapis with ctrl+h full-text Useso, and then save the upload overlay source file.

The ultimate Solution:

If the above methods are invalid, there is a simple and brutal way to download all WP files to the local, of course, the Uploads folder under the wp-content can not be used. Then use the notepad++ "file lookup" feature to replace all Googleapis with Useso, and then upload to overwrite the modified file.

However, if you use CDN acceleration, or any cache plug-ins, you will have to empty the cache after the change, especially Wp-total-cache plugins.

  • 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.