Optimize WordPress's Google fonts to speed up running _php instances on domestic servers

Source: Internet
Author: User

Google's fonts cannot be loaded without flipping over the wall because Google is completely out of the wall. Many novice friends often complain about how slow they buy the host, give the example station seconds open, but their own station to a few 10 seconds to open, but also a new installation of the WordPress site, no pictures are very slow. In fact, many times the slow WordPress speed is not the reason for the host, but because of Google fonts, today we will give you an optimized Google font of the super 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 use shortcut keys ctrl+alt+n.

Second, enter the developer mode, two browsers can use the shortcut ctrl+alt+n access. Here we take Firefox for example.

Then visit your website, in the bottom of the window will load the content by the domain name, you can see the content of ' fonts.googleapis.com ', it shows that your WordPress really quotes 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 ', and then will come out a bunch of plug-ins, ranked in front of the two plug-ins is "Disable Google Fonts" and "Remove Google fonts References." The "Remove Google Fonts Reference" plug-in is more effective.

Optimize Google Font Scheme 2:

Modify the WordPress code. If you can use FTP or online file editor to modify your WP code, this is an effective way. To the 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 wp-includes/scriptes-loader.php file, if you download to the local through FTP, it is recommended to use notepad++ open. Use Ctrl+h to replace Googleapis as Useso, and then save the upload overlay source file.

Investigate the solution:

If the above several methods are ineffective, there is a simple and crude method, the WP all files are packaged and downloaded to the local, of course, wp-content under the Uploads folder can not be used. Then use the notepad++ file Lookup feature to replace all googleapis with Useso and upload overwriting files that have been modified.

However, if you use CDN acceleration, or any caching plug-ins, you need to clear the cache after the modification, especially Wp-total-cache plug-ins.

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.